Example #1
0
State::State(): turn(WHITE) {
  setBackRow(0, WHITE, &board);
  setPawns(1, WHITE, &board);
  for (int row = 2; row <= 5; ++row) {
    setEmpty(row, &board);
  }
  setPawns(6, BLACK, &board);
  setBackRow(7, BLACK, &board);
}
Example #2
0
Board::Board()
{
	for (int i = 0; i < 8; i++)
		board[i] = new Piece[8];

	for (int col = 0; col < 8; col++)
	{
		setColors(col);
		setPawns(col);
	}

	setNonPawns(0);
	setNonPawns(7);
}