dinis / raspberryGameSuite

Multiplayer gaming plataform with raspberry pi as server and android phone as client.
GNU General Public License v3.0
1 stars 0 forks source link

Implement a simple game: Invites #33

Open TijoloAzul opened 7 years ago

TijoloAzul commented 7 years ago

A client X should be able to invite client Y to a game. And client Y should be able to answer yes (or no) ano therefore start (or not) a game:

  1. Design invite messages
  2. Client X can see people list
  3. Client X can invite Y to game type A
  4. Client X can invite everyone to game type A
  5. Server registers the invite and send message to Y
  6. Client Y can ask if there is any invitee
TijoloAzul commented 7 years ago

Some questions:

  1. Should we create an Invite entity with some structure like {Game{id, type}, Host{id, name}, Date, Status of Game, Status of Invite}?
  2. Where do we keep information about the game, for example, number of players?
  3. The list of invites should have all three kind of invites: a) games where everyone is invited; b) games where you are invited; c) games where you are the host
  4. Shall we restructure Success/Error server message, such that they have a common structure?
  5. Shall we use a non-standard toString for Player and Game?
  6. What should happen in the situation when A invites B for a game and B refuses: a) the game is open to everyone; b) the game is considered canceled?
TijoloAzul commented 7 years ago

Some conclusions:

  1. This info should be kept in the enum.
  2. Games should be considered public or not. A public game is canceled if host says so. A private game is canceled if or the host or any invitee says so.
  3. In the invite we should add if the game is public and its host.
  4. Do not bother with this.

Points 1 and 4 are still under discussion.

TijoloAzul commented 7 years ago

More conclusions:

  1. The Game entity will be kept, and createdan invite entity: 1.1. Game{id, type, host, date, ¿public?} 1.2. Invite{Game, Status, Opponents} 1.3. Invite status HOST will be droped in favour of ACCEPTED
  2. A new issue #40 was created to discuss this
TijoloAzul commented 7 years ago

Diagramas do que foi feito:

Explipação de uma primeira implementação: