If you only have two states for an object, is it worth it to still use the State Design pattern?
The context is a multi-player, turn-based game environment where there are Game "Tables" that a player can join, by either entering or leaving a seat.
So, I was focusing on the Seat object to start, as a way of trying to implement recent learning on design patterns.
Generally speaking, the Seat has two states: Vacant or Occupied. When a seat is Vacant, a player may join it. When a seat is Occupied, no other players may join and only the Player who has already joined, may leave.
This leads me to my other question...what if one of the states of the Seat is affected by a state in another object, the Game.
The Game object will also have various states. An example of this is, when all 4 players join the table and press Start, the game is considered to be IN PROGRESS.
Consequently, if a Player leaves a seat at this time, for example, by being disconnected, then the seat goes into a "third" state which is a Hiatus State where the spot is reserved for that player to return...but if the game is NOT in progress, then the player may leave the seat freely and it is not reserved.
How would the relationship between the two states be modelled? Would you add a third state to the States a seat can have?
Or is there some parent context that has both a GameState reference and SeatState reference and the "extra state" is handled there?
Any help or insight into the right direction would be much appreciated.