Method | Description | |
---|---|---|
GameBoardViewModel ( |
||
IsValidMove ( int row, int col ) : bool |
Determines whether the given move is valid for the next turn
|
|
IsValidMove ( int row, int col, BoardSquareState state ) : bool |
Determines whether the given move is valid
|
|
MakeMove ( int row, int col ) : void |
Makes the given move for the current player. Score are updated and play then moves to the next player.
|
Method | Description | |
---|---|---|
CanPlayerMakeAMove ( BoardSquareState state ) : bool |
Determines whether there are any valid moves that the given player can make.
|
|
FlipOpponentsCounters ( int row, int column, BoardSquareState state ) : void |
Flips all the opponents pieces that are surrounded by the given move.
|
|
GameBoardViewModel ( ) : System | ||
GetSquare ( int row, int col ) : |
||
HasGameFinished ( ) : bool | ||
InitialiseGame ( ) : void |
Sets up the view model to the initial game state.
|
|
InvertState ( BoardSquareState state ) : BoardSquareState | ||
MoveSurroundsCounters ( int row, int column, NavigationFunction navigationFunction, BoardSquareState state ) : bool |
Determines whether the given move 'surrounds' any of the opponents pieces.
|
|
NavigateBoard ( NavigationFunction navigationFunction, int row, int column ) : IEnumerable |
A list of board squares that are yielded via the given navigation function.
|
public GameBoardViewModel ( |
||
copy | ||
return | System |
public IsValidMove ( int row, int col ) : bool | ||
row | int | |
col | int | |
return | bool |
public IsValidMove ( int row, int col, BoardSquareState state ) : bool | ||
row | int | |
col | int | |
state | BoardSquareState | |
return | bool |