예제 #1
0
파일: Chess.cs 프로젝트: Vedmax/01-quality
 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;
 }
예제 #2
0
 public Move(Board board, Location from, Location to, Cell oldDestinationCell)
 {
     this.board = board;
     this.from = from;
     this.to = to;
     this.oldDestinationCell = oldDestinationCell;
 }
예제 #3
0
 public void Set(Location location, Cell cell)
 {
     cells[location.X, location.Y] = cell;
 }