Exemple #1
0
 public Figure GetFigureOnLocation(FieldLocation fieldLocation)
 {
     return(Figures.FirstOrDefault(x => x.Location.Row == fieldLocation.Row && x.Location.Column == fieldLocation.Column));
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #4
0
 private bool IsInBoard(FieldLocation location)
 {
     return(location.Column >= 1 && location.Row >= 1 && location.Column <= 8 && location.Row <= 8);
 }