JaredHatfield / card-surface

Automatically exported from code.google.com/p/card-surface
0 stars 0 forks source link

Create property to expose the maximum number of players for a particular game type #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We need to be able to determine the maximum number of players that a game 
supports.  CardCommunication should then use this value when sending the 
cryptic string to CardTable for joining an existing game (as opposed to 
always using 8).

This will also require CardCommunication to include the New Game option in 
the list that it sends because CardTable will not be able to know the 
maximum number of players each particular game supports because it isn't 
supposed to know about each particular game.  Remove the static New Game 
string from CardTable and send it with the list of Existing Game options.  
The New Game option should still use an empty Guid.  CardTable knows if 
the Guid is empty, it's supposed to ask for a new game instead of an 
existing one.

Original issue reported on code.google.com by krussell...@gmail.com on 12 Apr 2010 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by krussell...@gmail.com on 12 Apr 2010 at 2:42

GoogleCodeExporter commented 9 years ago
I will implement this by adding a flag to a Seat that indicates that someone is 
allowed 
to sit down in that particular Seat.  This will be customizable by a specific 
instance 
of a game.  Additionally, trying to sit down in a seat that has this flag set 
to no 
will throw an exception.

To expose two public integer properties that will expose the maximum number of 
players 
and number of players in the game.

Original comment by jjhatf02 on 12 Apr 2010 at 2:44

GoogleCodeExporter commented 9 years ago
A property already existed to get the number of players that are in the game 
(NumberOfPlayers).

This will add a new property that will get the number of seats (NumberOfSeats). 
 The 
maximum number of seats is 8 by design.  A Seat now contains an IsSittable 
property 
that indicates if someone is allowed to sit in that Seat.  If a player attempts 
to 
sit down in a non-sittable Seat, a CardGameSeatNotSittableException is thrown.

This should accomplish all of the required functionality.

The thing to remember though is the NumberOfSeats property return a number that 
is 
less than or equal to 8.

Original comment by jjhatf02 on 12 Apr 2010 at 3:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r259.

Original comment by jjhatf02 on 12 Apr 2010 at 3:19

GoogleCodeExporter commented 9 years ago
Aaron, please make the changes to CardCommunication based on this update.  I 
can 
remove the "New Game" option from CardTable once you're done if you want me to.

Original comment by krussell...@gmail.com on 12 Apr 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Was this issue resolved already?

Original comment by jjhatf02 on 14 Apr 2010 at 3:27

GoogleCodeExporter commented 9 years ago

Original comment by jjhatf02 on 15 Apr 2010 at 8:37