private void InitializeChessPieces(PieceColor pieceColor) { // Pawns SetSquare(1, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(2, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(3, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(4, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(5, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(6, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(7, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); SetSquare(8, pieceColor.PawnChainRank(), new Pawn(this, pieceColor)); // Officers SetSquare(1, pieceColor.OfficerRank(), new Rook(this, pieceColor)); SetSquare(8, pieceColor.OfficerRank(), new Rook(this, pieceColor)); SetSquare(2, pieceColor.OfficerRank(), new Knight(this, pieceColor)); SetSquare(7, pieceColor.OfficerRank(), new Knight(this, pieceColor)); SetSquare(3, pieceColor.OfficerRank(), new Bishop(this, pieceColor)); SetSquare(6, pieceColor.OfficerRank(), new Bishop(this, pieceColor)); SetSquare(4, pieceColor.OfficerRank(), new Queen(this, pieceColor)); SetSquare(5, pieceColor.OfficerRank(), new King(this, pieceColor)); }