C# Class MingStar.SimUniversity.Game.Game

Inheritance: IGame, IGameForUpdate
Mostrar archivo Open project: MingStar/SimUniversity Class Usage Examples

Private Properties

Property Type Description
CreateUniversities void
CutStudents DegreeType[][]
Enrol DegreeCount[]
IGame IEnumerable
Reset void
RollDice MingStar.SimUniversity.Contract.EnrolmentInfo

Public Methods

Method Description
ApplyMove ( IPlayerMove move ) : void
BuildCampus ( VertexPosition whereAt, CampusType type ) : void
BuildLink ( EdgePosition whereAt ) : void
DiceRoll ( int diceTotal ) : EnrolmentInfo
Game ( IBoard board, int numOfPlayers ) : System
Game ( IBoard board, int numOfPlayers, IGameRules rules ) : System
GenerateAllMoves ( ) : ReadOnlyCollection
GetScore ( IUniversity university ) : int
GetUniversityByColor ( System.Color color ) : University
GetUniversityByIndex ( int index ) : IUniversity
GetVertexProductionChance ( IVertex vertex ) : int
HasWinner ( ) : bool
IsLegalMove ( IPlayerMove move ) : bool
IsLegalToBuildCampus ( VertexPosition whereAt, CampusType type ) : bool
IsLegalToBuildLink ( EdgePosition pos ) : bool
NextTurn ( ) : void
SetUpLink ( int x, int y, EdgeOrientation eo ) : void
TradeInStudent ( DegreeType tradedIn ) : void
TryStartUp ( bool isSuccessful ) : void
UnTradeInStudent ( DegreeType tradedIn ) : void
UndoBuildCampus ( VertexPosition whereAt ) : void
UndoBuildLink ( EdgePosition whereAt ) : void
UndoEndTurn ( int diceTotal, EnrolmentInfo enrolmentInfo ) : void
UndoMove ( ) : void
UndoTryStartUp ( bool isSuccessful ) : void

Protected Methods

Method Description
BuildCampus ( int x, int y, VertexOrientation vo, CampusType type ) : void

Private Methods

Method Description
CreateUniversities ( int numOfPlayers ) : void
CutStudents ( ) : DegreeType[][]
Enrol ( int hexID ) : DegreeCount[]
IGame ( ) : IEnumerable
Reset ( ) : void
RollDice ( int total ) : EnrolmentInfo

Method Details

ApplyMove() public method

public ApplyMove ( IPlayerMove move ) : void
move IPlayerMove
return void

BuildCampus() public method

public BuildCampus ( VertexPosition whereAt, CampusType type ) : void
whereAt MingStar.SimUniversity.Contract.VertexPosition
type CampusType
return void

BuildCampus() protected method

protected BuildCampus ( int x, int y, VertexOrientation vo, CampusType type ) : void
x int
y int
vo VertexOrientation
type CampusType
return void

BuildLink() public method

public BuildLink ( EdgePosition whereAt ) : void
whereAt MingStar.SimUniversity.Contract.EdgePosition
return void

DiceRoll() public method

public DiceRoll ( int diceTotal ) : EnrolmentInfo
diceTotal int
return MingStar.SimUniversity.Contract.EnrolmentInfo

Game() public method

public Game ( IBoard board, int numOfPlayers ) : System
board IBoard
numOfPlayers int
return System

Game() public method

public Game ( IBoard board, int numOfPlayers, IGameRules rules ) : System
board IBoard
numOfPlayers int
rules IGameRules
return System

GenerateAllMoves() public method

public GenerateAllMoves ( ) : ReadOnlyCollection
return ReadOnlyCollection

GetScore() public method

public GetScore ( IUniversity university ) : int
university IUniversity
return int

GetUniversityByColor() public method

public GetUniversityByColor ( System.Color color ) : University
color System.Color
return University

GetUniversityByIndex() public method

public GetUniversityByIndex ( int index ) : IUniversity
index int
return IUniversity

GetVertexProductionChance() public method

public GetVertexProductionChance ( IVertex vertex ) : int
vertex IVertex
return int

HasWinner() public method

public HasWinner ( ) : bool
return bool

IsLegalMove() public method

public IsLegalMove ( IPlayerMove move ) : bool
move IPlayerMove
return bool

IsLegalToBuildCampus() public method

public IsLegalToBuildCampus ( VertexPosition whereAt, CampusType type ) : bool
whereAt MingStar.SimUniversity.Contract.VertexPosition
type CampusType
return bool

IsLegalToBuildLink() public method

public IsLegalToBuildLink ( EdgePosition pos ) : bool
pos MingStar.SimUniversity.Contract.EdgePosition
return bool

NextTurn() public method

public NextTurn ( ) : void
return void

SetUpLink() public method

public SetUpLink ( int x, int y, EdgeOrientation eo ) : void
x int
y int
eo EdgeOrientation
return void

TradeInStudent() public method

public TradeInStudent ( DegreeType tradedIn ) : void
tradedIn DegreeType
return void

TryStartUp() public method

public TryStartUp ( bool isSuccessful ) : void
isSuccessful bool
return void

UnTradeInStudent() public method

public UnTradeInStudent ( DegreeType tradedIn ) : void
tradedIn DegreeType
return void

UndoBuildCampus() public method

public UndoBuildCampus ( VertexPosition whereAt ) : void
whereAt MingStar.SimUniversity.Contract.VertexPosition
return void

UndoBuildLink() public method

public UndoBuildLink ( EdgePosition whereAt ) : void
whereAt MingStar.SimUniversity.Contract.EdgePosition
return void

UndoEndTurn() public method

public UndoEndTurn ( int diceTotal, EnrolmentInfo enrolmentInfo ) : void
diceTotal int
enrolmentInfo MingStar.SimUniversity.Contract.EnrolmentInfo
return void

UndoMove() public method

public UndoMove ( ) : void
return void

UndoTryStartUp() public method

public UndoTryStartUp ( bool isSuccessful ) : void
isSuccessful bool
return void