Unique win conditions for players
sourencho opened this issue · comments
We currently have one condition that applies to all players.
We should create a unique and fair win condition for each player.
We need to be careful not to end up in a world state where it's impossible for a player to win. For example the scenario where all the red mines are depleted and a player needs red resources.
Perhaps to avoid this for the MVP we can make the mines have infinite (or a very large number) capacity.
My plan for this:
- have registerClient flow provide unique win conditions from the server
- have resource controller store the win conditions and add a method which says "resource needs met" basically, which is the game over condition
- modify getGameOver in gameObjectController to use resource controller's method for checking if needs are met
- increase amount of starting resources to be very large for now (iterating on this will be a key aspect of game design and output of play testing)
Discussed offline and decided that player controller should own the method that tells you if any player has won