public IncommingMissiles(Sea sea, IEnumerable <Missile> missiles) { TheSea = sea; Missiles = missiles; Chance = new Chance(1, 3); Challenge = new Challenge(); }
public GameEngine(IUpdateable form) { TheSea = new Sea(); ViewModel = new ViewModel(this.TheSea, form); Turns = new List <Turn>(); CurrentTurn = new NoTurn(new List <BattleShip>(), TheSea, ViewModel); }
public Turn(IEnumerable <BattleShip> BattleShips, Sea sea, ViewModel viewModel) { Randomizer = new Random(); FiredMissiles = new List <Missile>(); this.BattleShips = new List <BattleShip> (BattleShips); this.TheSea = sea; this.ViewModel = viewModel; }
public ViewModel(Sea Sea, IUpdateable form) { TheSea = Sea; Form = form; BackgroundLayer = new BackgroundLayer(); SeaBottomLayer = new SeaBottomLayer(this.TheSea); SeaSurfaceLayer = new SeaSurfaceLayer(this.TheSea); AnimationLayer = new AnimationLayer(); }
public void Recalculate() { this.Clear(); IEnumerable <BattleShip> sunkShips = this.TheSea.GetAllSunkShips(); IEnumerable <ICoordinate> coordinates = Sea.GetAllCoordinatesFrom(sunkShips); foreach (ICoordinate coordinate in coordinates) { this.AddDisplayValue(coordinate.GetX(), coordinate.GetY(), SunkShipValue); } }
public SailAway(BattleShip ship, Sea sea) { Ship = ship; TheSea = sea; }
public SeaBottomLayer(Sea sea) { this.TheSea = sea; }
public NoTurn(IEnumerable <BattleShip> BattleShips, Sea sea, ViewModel viewModel) : base(BattleShips, sea, viewModel) { }
public CollisionDetection(Sea sea, BattleShip ship) { TheSea = sea; OwnLocation = ship.GetLocation(); }
public SeaSurfaceLayer(Sea sea) { this.TheSea = sea; }