Skip to main content
added 4 characters in body
Source Link
pdr
  • 53.8k
  • 14
  • 139
  • 225

Remember, this is just a free example and you get what you paid for it. Don't try to apply it directly to your game. Just use it to understand how the State Pattern should work in the context of a game.

Remember, this is just a free example and you get what you paid for it. Don't try to apply it directly to your game. Just use it to understand the State Pattern should work in the context of a game.

Remember, this is just a free example and you get what you paid for it. Don't try to apply it directly to your game. Just use it to understand how the State Pattern should work in the context of a game.

added 92 characters in body
Source Link
pdr
  • 53.8k
  • 14
  • 139
  • 225

I think you may be getting a little bogged down in the English meaning of state, when compared to the State Pattern (or Finite-State Machine, which is really a diagrammatic representation of a State Pattern). Both are appropriate here, but they shouldn't be confused.

I think you may be getting a little bogged down in the English meaning of state, when compared to the State Pattern. Both are appropriate here, but they shouldn't be confused.

I think you may be getting a little bogged down in the English meaning of state, when compared to the State Pattern (or Finite-State Machine, which is really a diagrammatic representation of a State Pattern). Both are appropriate here, but they shouldn't be confused.

added 51 characters in body
Source Link
pdr
  • 53.8k
  • 14
  • 139
  • 225

The game state is a list of players, pieces, cards, dice, whatever else, and all the information required to simulate them. You might want to call that the context.

The game state is a list of players, pieces, cards, dice, whatever else. You might want to call that the context.

The game state is a list of players, pieces, cards, dice, whatever else, and all the information required to simulate them. You might want to call that the context.

Source Link
pdr
  • 53.8k
  • 14
  • 139
  • 225
Loading