Advice for ways to track game state for a card game

Godot Version

4.3

Question

I’m making a pretty simple 2-player card game where the goal is to fill all three of your banks to reach a certain total based on the value of the cards. Mechanically, the game is complete. It deals cards, players can draw a card, play a card, and discard a card. However, there is nothing in the code to tell the game that the player is only allowed to play one card and discard one card, and that the player’s turn is over when he discards. The only reason the player can’t draw more than one card is because the draw card button deactivates after being pressed. But for everything else,

So, for example, I can draw a card, the draw pile deactivates as normal, but then I can play and/or discord as many cards as I wish, and I can also discard before drawing or playing. This is obviously no good.

What is the best way to handle keeping track of the game state in this situation? My first instinct is a finite state machine but those are so complicated and I don’t really understand them all that well. Plus, all the tutorials I’ve found are just for using them for character states like jumping, shooting, etc. and it’s kind of headache-inducing trying to sort of transpose those things into a card game. It would be doable, but a pain. Are there any simpler ways for keeping track of the game state?

Just a plain old variable works like:

var has_drawn = false
if not has_drawn:
    draw_card()
    has_drawn = true

But then how would I handle more abstract situations, like “has this player played a card” or "has this player discarded, or “is this player’s turn now over?” or “when is it the other player’s turn”?

Create an enum, something like “turn_state” with values like DRAW_PHASE, PLAY_PHASE, DISCARD_PHASE and an Integer to represent which players turn it is.
Or alternatively if they can do things in any order, just some simple variables to represent each action or the amount of each action left.
cards_to_draw = 1
cards_to_play = 1
cards_to_discard = 1
Then decrement the number when they do one of those actions, disallowing that action if the number is zero. At the start of a player’s turn, reset the numbers. If you want the turn to automatically end, just have some function that checks whether the turn should end by checking the variables each time they do an action.

For a simple state machine use enums and match, and the match calls a function.
That’s all I ever use when it comes to a state machine.