alnah005 / Konkan

Flutter game that is popular in my home country (Yemen)
1 stars 0 forks source link

Create a game state class #41

Closed alnah005 closed 4 years ago

alnah005 commented 4 years ago

A game state class must be created to make online games with multiple players possible.

The game state class must have enough information for the game to function properly, but not too much information for someone to hack the game using the gamestate, but that can ignored if it's too difficult.

Game state must have these:

  1. Cards to draw
  2. Cards discarded by previous players
  3. Player information: a. how many cards they have left b. whose turn is it c. who's next
  4. Score to set cards
  5. Set cards
FaisalAlwazir commented 4 years ago

@alnah005

https://github.com/alnah005/Konkan/blob/7f20cfad25696cb73491134889223f47c1de0470/lib/models/player.dart#L42

Would you mind clearing this up for me? When it's true then you are allowed to drop a card to dropped cards, false means you cant?? or is it the opposite? Thanks.

alnah005 commented 4 years ago

@alnah005

https://github.com/alnah005/Konkan/blob/7f20cfad25696cb73491134889223f47c1de0470/lib/models/player.dart#L42

Would you mind clearing this up for me? When it's true then you are allowed to drop a card to dropped cards, false means you cant?? or is it the opposite? Thanks.

When it's true it means the player has discarded a card so is not allowed to discard more cards into discarded cards deck during the same turn. It's a little confusing I must admit.

alnah005 commented 4 years ago

This issue depends on completing #42

FaisalAlwazir commented 4 years ago

Nice work man. I see that it still has a lot of work to be done.

right off the bat, i noticed this line of code

https://github.com/alnah005/Konkan/blob/41f8270fb5cad893789a945410bf2929532490c7/lib/models/konkan_game_state.dart#L7

wouldn't it be more convenient if the deck is stored inside the roundState, since each round would need its own deck?

alnah005 commented 4 years ago

All done with something added to the UI