Click or drag to resize
Board Class
The Board class represents the play board for the game.
Inheritance Hierarchy
SystemObject
  VikingChess.ModelBoard

Namespace: VikingChess.Model
Assembly: VikingChess (in VikingChess.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class Board

The Board type exposes the following members.

Constructors
  NameDescription
Public methodBoard(Board)
Copy Constructor
Public methodBoard(Int32, String)
Constructor. Makes a new board object of the specified size
Top
Methods
  NameDescription
Public methodcountPieces
Public methoddecrementBlackCount
Decrements the blackPieces on this board.
Public methoddecrementWhiteCount
Decrements the whitePieces on this board.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBoard
Returns the array containing the board data.
Public methodgetCurrentPlayer
gets the current Player for this Board
Public methodgetGameType
Returns the gameType of this Board
Public methodGetHashCode (Inherited from Object.)
Public methodGetPosition
Returns the index position in the board array corresponding to the passed in rankfile location.
Public methodGetSize
Returns the size of the board array.
Public methodGetSquare
Returns the Square at the specified location
Public methodGetType (Inherited from Object.)
Public methodInitializeBoard
Creates new Square objects at the appropriate location in the board array and defines the neighbours for each square.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPrintBoard
Prints a representation of the board
Private methodsetArdRiPieces
Sets the starting position for the Ard Rí pieces.
Private methodsetBrandubhPieces
Sets the starting position for the Brandubh pieces.
Public methodsetCurrentPlayer
Sets the current Player for this Board.
Private methodsetHnefataflPieces
Sets the starting position for the Hnefatafl pieces.
Public methodSetNeighbours
Sets and defines the neighbour locations of a Square in the board array.
Public methodSetPieces
Sets the position of the Piece objects on the Board depending on the gametype
Public methodSetSpecialSquares
Public methodSetSquare
Sets the passed in location in the board array to the Square passed in.
Private methodsetTablutPieces
Sets the starting position for the Tablut pieces.
Private methodsetTawlbwrddPieces
Sets the starting position for the Tawlbwrdd pieces.
Public methodToString
A String representation of this Board.
(Overrides ObjectToString.)
Top
Fields
  NameDescription
Private fieldblackPieces
The number of black pieces on this board.
Private fieldboard
The array holding the board data
Private fieldcurrentPlayer
The player who moves next
Private fieldgameType
The type of Game this is.
Private fieldsize
The size of the board.
Private fieldwhitePieces
The number of white pieces on this board.
Top
See Also