Esempio n. 1
0
 private bool HasMoves(Location to, Location @from, Cell old)
 {
     var hasMoves = false;
     board.Set(to, board.Get(@from));
     board.Set(@from, Cell.Empty);
     if (!IsCheck())
         hasMoves = true;
     board.Set(@from, board.Get(to));
     board.Set(to, old);
     return hasMoves;
 }
Esempio n. 2
0
 public Move(Board board, Location from, Location to, Cell oldDestinationCell)
 {
     this.board = board;
     this.from = from;
     this.to = to;
     this.oldDestinationCell = oldDestinationCell;
 }
Esempio n. 3
0
 public void Set(Location location, Cell cell)
 {
     cells[location.X, location.Y] = cell;
 }