C# Class ArmedCards.Entities.Game

Object that defines a Game
Datei anzeigen Open project: kwmcrell/ArmedCards Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
CurrentRound ( ) : Entities.GameRound

Get the current round

DetermineCommander ( ) : Entities.User

Determine who the card commander is

Game ( ) : System

Default Constructor

Game ( IDataReader idr ) : System

Constructor used by the data layer

HasRequiredNumberOfPlayers ( ) : System.Boolean

Determine if the game has required number of players

HasRounds ( ) : System.Boolean

Determine if the game has rounds

HasWinner ( ) : System.Boolean

Determine if the game has a winner

IsCurrentCommander ( Int32 userId ) : System.Boolean

Determine if user is the card commander

IsCurrentPlayer ( Int32 userID ) : System.Boolean

Determine if user is already a player

IsCurrentSpectator ( Int32 userID ) : System.Boolean

Determine if user is already a player

IsFull ( ) : System.Boolean

Determine if the game is full

IsWaiting ( ) : System.Boolean

Determine if the game is in waiting state

MaxSpectatorsReached ( ) : System.Boolean

Determine if the max number of spectators has been reached

NextCommander ( Entities newCommander ) : Entities.User

Get the next commander

NumberOfPlayersNeededToStart ( ) : Int32

Determine number of players still needed

Method Details

CurrentRound() public method

Get the current round
public CurrentRound ( ) : Entities.GameRound
return Entities.GameRound

DetermineCommander() public method

Determine who the card commander is
public DetermineCommander ( ) : Entities.User
return Entities.User

Game() public method

Default Constructor
public Game ( ) : System
return System

Game() public method

Constructor used by the data layer
public Game ( IDataReader idr ) : System
idr IDataReader The datareader used to build the game
return System

HasRequiredNumberOfPlayers() public method

Determine if the game has required number of players
public HasRequiredNumberOfPlayers ( ) : System.Boolean
return System.Boolean

HasRounds() public method

Determine if the game has rounds
public HasRounds ( ) : System.Boolean
return System.Boolean

HasWinner() public method

Determine if the game has a winner
public HasWinner ( ) : System.Boolean
return System.Boolean

IsCurrentCommander() public method

Determine if user is the card commander
public IsCurrentCommander ( Int32 userId ) : System.Boolean
userId System.Int32
return System.Boolean

IsCurrentPlayer() public method

Determine if user is already a player
public IsCurrentPlayer ( Int32 userID ) : System.Boolean
userID System.Int32 The userID
return System.Boolean

IsCurrentSpectator() public method

Determine if user is already a player
public IsCurrentSpectator ( Int32 userID ) : System.Boolean
userID System.Int32 The userID
return System.Boolean

IsFull() public method

Determine if the game is full
public IsFull ( ) : System.Boolean
return System.Boolean

IsWaiting() public method

Determine if the game is in waiting state
public IsWaiting ( ) : System.Boolean
return System.Boolean

MaxSpectatorsReached() public method

Determine if the max number of spectators has been reached
public MaxSpectatorsReached ( ) : System.Boolean
return System.Boolean

NextCommander() public method

Get the next commander
public NextCommander ( Entities newCommander ) : Entities.User
newCommander Entities The winner of the last round
return Entities.User

NumberOfPlayersNeededToStart() public method

Determine number of players still needed
public NumberOfPlayersNeededToStart ( ) : Int32
return System.Int32