Ejemplo n.º 1
0
 public Figure GetFigureOnLocation(FieldLocation fieldLocation)
 {
     return(Figures.FirstOrDefault(x => x.Location.Row == fieldLocation.Row && x.Location.Column == fieldLocation.Column));
 }
Ejemplo n.º 2
0
 public Move(int rowFrom, int colFrom, int rowTo, int colTo, GameSide gameSide)
 {
     Side = gameSide;
     From = new FieldLocation(rowFrom, colFrom);
     To   = new FieldLocation(rowTo, colTo);
 }
Ejemplo n.º 3
0
 public Move(FieldLocation from, FieldLocation to, GameSide gameSide)
 {
     From = new FieldLocation(from.Row, from.Column);
     To   = new FieldLocation(to.Row, to.Column);
     Side = gameSide;
 }
Ejemplo n.º 4
0
 private bool IsInBoard(FieldLocation location)
 {
     return(location.Column >= 1 && location.Row >= 1 && location.Column <= 8 && location.Row <= 8);
 }