Beispiel #1
0
 public Piece GetPiece(Location location)
 {
     return ActivePieces.SingleOrDefault(x => x.CurrentLocation.Equals(location));
 }
Beispiel #2
0
 public Piece GetPiece(Location location, Player owner)
 {
     var piece = GetPiece(location);
     return piece != null && piece.Owner == owner ? piece : null;
 }
Beispiel #3
0
 public bool Equals(Location other)
 {
     return string.Equals(XY, other.XY);
 }