Hello! So I went through the hearts tutorial, and it seems to work to the extent it was meant to.
For my own understanding, I would like to be able to check if a card is valid when attempting to play (aka follow suit). And if it does not for a notification in red to appear, like how it does when you try playing a card when it is not your turn. Does anyone know how to do this? A code example would be fantastic, but any help or guidance at all would be appreciated.
My inclination is to put the logic in game.php's playCard, but unsure how to process the red notification while staying in the same state. My inclination could also be 100% wrong lol, so yup, thank you in advance. (:
For my own understanding, I would like to be able to check if a card is valid when attempting to play (aka follow suit). And if it does not for a notification in red to appear, like how it does when you try playing a card when it is not your turn. Does anyone know how to do this? A code example would be fantastic, but any help or guidance at all would be appreciated.
My inclination is to put the logic in game.php's playCard, but unsure how to process the red notification while staying in the same state. My inclination could also be 100% wrong lol, so yup, thank you in advance. (: