public override bool moveTo(Square s) { if (s != null) { if (s.isWalkable()) { if (s.mayContainBarricade()) { if (s.isOccupied()) { return false; } else { s.Piece = this; Square = s; Player.Baricade = null; Player = null; return true; } } } } return false; }
public override bool moveTo(Square s) { if (s != null) { if (s.isWalkable()) { if (s.mayContainPawn()) { if (s.isOccupied()) { return s.Piece.isHit(this); } else { Square.removePawn(this); s.setPawn(this); return true; } } } } return false; }