C# Class TheGame.Universe

ファイルを表示 Open project: stonemonkey/Internship2013 Class Usage Examples

Public Properties

Property Type Description
CurrentWorld List
NewBornShouldBeGrey bool
NextWorld List

Public Methods

Method Description
AddAliveCellInNextGeneration ( Cell cell ) : void
AddCellInCurrentGeneration ( int i, int j ) : void
AddDeadCellInNextGeneration ( Cell cell ) : void
AliveCellRemainsAlive ( Cell cell ) : void
CellHasNeighboursOnRightAndLeftSide ( Cell cellToBeVerified, Cell cell ) : bool
CellHasNeighboursOnTop ( Cell cellToBeVerified, Cell unit ) : bool
CellHasNeighboursUnder ( Cell cellToBeVerified, Cell unit ) : bool
CountNumberOfWhiteAndBlackCells ( Cell cell, int &white, int &black ) : void
DeadCellRevives ( Cell cell ) : void
DecideIfCellBecomesDeadOrAlive ( Cell cell ) : void
DecideIfNewBornShouldBeGrey ( int black, int white ) : void
DrawWorld ( ) : void
IncreaseNumberOfAliveNeighbours ( int &numberOfAliveNeighbours ) : void
NumberOfAliveNeighbours ( Cell cellToBeVerified ) : int
Universe ( ) : System
WorldStillHasAliveCells ( ) : bool

Method Details

AddAliveCellInNextGeneration() public method

public AddAliveCellInNextGeneration ( Cell cell ) : void
cell Cell
return void

AddCellInCurrentGeneration() public method

public AddCellInCurrentGeneration ( int i, int j ) : void
i int
j int
return void

AddDeadCellInNextGeneration() public method

public AddDeadCellInNextGeneration ( Cell cell ) : void
cell Cell
return void

AliveCellRemainsAlive() public method

public AliveCellRemainsAlive ( Cell cell ) : void
cell Cell
return void

CellHasNeighboursOnRightAndLeftSide() public method

public CellHasNeighboursOnRightAndLeftSide ( Cell cellToBeVerified, Cell cell ) : bool
cellToBeVerified Cell
cell Cell
return bool

CellHasNeighboursOnTop() public method

public CellHasNeighboursOnTop ( Cell cellToBeVerified, Cell unit ) : bool
cellToBeVerified Cell
unit Cell
return bool

CellHasNeighboursUnder() public method

public CellHasNeighboursUnder ( Cell cellToBeVerified, Cell unit ) : bool
cellToBeVerified Cell
unit Cell
return bool

CountNumberOfWhiteAndBlackCells() public method

public CountNumberOfWhiteAndBlackCells ( Cell cell, int &white, int &black ) : void
cell Cell
white int
black int
return void

DeadCellRevives() public method

public DeadCellRevives ( Cell cell ) : void
cell Cell
return void

DecideIfCellBecomesDeadOrAlive() public method

public DecideIfCellBecomesDeadOrAlive ( Cell cell ) : void
cell Cell
return void

DecideIfNewBornShouldBeGrey() public method

public DecideIfNewBornShouldBeGrey ( int black, int white ) : void
black int
white int
return void

DrawWorld() public method

public DrawWorld ( ) : void
return void

IncreaseNumberOfAliveNeighbours() public method

public IncreaseNumberOfAliveNeighbours ( int &numberOfAliveNeighbours ) : void
numberOfAliveNeighbours int
return void

NumberOfAliveNeighbours() public method

public NumberOfAliveNeighbours ( Cell cellToBeVerified ) : int
cellToBeVerified Cell
return int

Universe() public method

public Universe ( ) : System
return System

WorldStillHasAliveCells() public method

public WorldStillHasAliveCells ( ) : bool
return bool

Property Details

CurrentWorld public_oe property

public List CurrentWorld
return List

NewBornShouldBeGrey public_oe property

public bool NewBornShouldBeGrey
return bool

NextWorld public_oe property

public List NextWorld
return List