C# Class ArmedCards.Entities.GameRound

The object that defines a round in a game
Datei anzeigen Open project: kwmcrell/ArmedCards

Public Methods

Method Description
AllPlayersAnswered ( ) : System.Boolean

Check to see if all players have answered

GameRound ( ) : System
GameRound ( IDataReader idr ) : System
GroupedAnswers ( ) : Entities.GameRoundCard>>.List

Return grouped answers based on who played them

HasAnswer ( Int32 userId ) : System.Boolean

Check to see if user has answered the question already

HasWinner ( ) : System.Boolean

The round has a winner

IsCommander ( Int32 userId ) : System.Boolean

Determine if the user is the card commander

ValidateCardPlayedCount ( Int32 cardsCount ) : System.Boolean

Validate the right number of cards were played for the question

ValidateWinnerSelection ( List cardIDs ) : List

Validate that the selected winner was in fact played during the round

Winner ( ) : Entities.User

Get the next commander based round winner

Method Details

AllPlayersAnswered() public method

Check to see if all players have answered
public AllPlayersAnswered ( ) : System.Boolean
return System.Boolean

GameRound() public method

public GameRound ( ) : System
return System

GameRound() public method

public GameRound ( IDataReader idr ) : System
idr IDataReader
return System

GroupedAnswers() public method

Return grouped answers based on who played them
public GroupedAnswers ( ) : Entities.GameRoundCard>>.List
return Entities.GameRoundCard>>.List

HasAnswer() public method

Check to see if user has answered the question already
public HasAnswer ( Int32 userId ) : System.Boolean
userId System.Int32 The user Id to check
return System.Boolean

HasWinner() public method

The round has a winner
public HasWinner ( ) : System.Boolean
return System.Boolean

IsCommander() public method

Determine if the user is the card commander
public IsCommander ( Int32 userId ) : System.Boolean
userId System.Int32 The user Id to check
return System.Boolean

ValidateCardPlayedCount() public method

Validate the right number of cards were played for the question
public ValidateCardPlayedCount ( Int32 cardsCount ) : System.Boolean
cardsCount System.Int32 The number of cards played
return System.Boolean

ValidateWinnerSelection() public method

Validate that the selected winner was in fact played during the round
public ValidateWinnerSelection ( List cardIDs ) : List
cardIDs List The IDs of winning cards
return List

Winner() public method

Get the next commander based round winner
public Winner ( ) : Entities.User
return Entities.User