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