Пример #1
0
 public void SetPieces(Game game)
 {
     if (game == null) throw new ArgumentNullException("game");
     for (int rank = 1; rank <= 8; rank++)
     {
         for (char file = 'a'; file <= 'h'; file++)
         {
             Piece piece = game.GetPiece(new Location(file, rank));
             _boardSpaces[file - 'a', rank - 1].Text = piece != null ? AsciiPiece.GetCharForPiece(piece).ToString() : "";
         }
     }
 }