Peace be upon you. According to Grand Ayatollah Sayyid Sistani (may Allah protect him), playing card games is forbidden even on phones and computers if there is betting involved. If there is no betting, it is still recommended to avoid playing them if they are considered gambling tools in the local culture. The ruling does not change whether one plays alone or with another person. According to Grand Ayatollah Sayyid Khamenei (may Allah protect him), if the game is played on a computer or phone between two people, it is treated like gambling and is forbidden with or without betting. However, if one plays alone, there is no issue as long as it does not lead to any harm. May you be successful in all good deeds.