Пример #1
0
 protected void AcceptMove(PieceMove move)
 {
     if (move.IsPartOf(drawer.board))
     {
         //drawer.SwitchBoard (move.GetNextBoard ());
         handler.ApplyBoard(move.GetNextBoard());
     }
 }
Пример #2
0
 public void EnableMoves(PlayerColor player)
 {
     if (move != null)
     {
         drawer.SwitchBoard(move.GetNextBoard());
         //drawer.RefreshBoard ();
         return;
     }
     drawer.RefreshBoard();
     ColorTile(Color.cyan, true);
     if (player == drawer.CurrentTurn() && node.piece != null && node.piece.color == player)
     {
         List <PieceMove> moves = node.piece.GetValidMoves();
         //List<PieceMove> moves = node.piece.GetMoves ();
         foreach (var move in moves)
         {
             //cord.GetTileHandler (drawer).SetFocus (true);
             move.end.GetTileHandler(drawer).EnableMove(move);
         }
     }
 }