protected override bool CanMove(Ocean aquarium, Point move) { var fishAtLocation = aquarium.GetFishAt(Location.X + move.X, Location.X + move.Y); return(fishAtLocation == this || fishAtLocation == null || fishAtLocation is SmallFish); }
protected override void MoveTo(Ocean ocean, Point location) { var fishAtLocation = ocean.GetFishAt(location.X, location.Y); if (fishAtLocation != null) { ocean.Remove(fishAtLocation); } ocean.MoveTo(this, location); }