Scholars differ. Many forbid it when it is played for money (as gambling, 5:90) or if it makes a person neglect prayer. The Shafi'i school permitted it as disliked, and the other schools often forbade it. Games that cause no sin or neglect are allowed in general, so avoid betting and keep prayer on time.
Ó fiéis, as bebidas inebriantes, os jogos de azar, a dedicação às pedras e as adivinhações com setas, são manobrasabomináveis de Satanás. Evitai-os, pois, para que prospereis.
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Questions about halal and haram
Is chess permitted?
Scholars differ. Many forbid it when it is played for money (as gambling, 5:90) or if it makes a person neglect prayer. The Shafi'i school permitted it as disliked, and the other schools often forbade it. Games that cause no sin or neglect are allowed in general, so avoid betting and keep prayer on time.