void SetAroundHits(Coordenada2D location, int size, Position pos) { List <Coordenada2D> around = null; around = board[1].Around(location.X + 1, location.Y + 1, size, pos); SetCoordenada(location.X, location.Y, 11, 1); foreach (var item in around) { escena.AddModel(new ExplosionSquare(item.X - 1, item.Y - 1, 2, Player.Computer)); } }
public bool BoardMouse(float mouseX, float mouseY) { Coordenada2D punto = BoardSelection(mouseX, mouseY); if (punto.X != -1) { return(true); } return(false); }
public Coordenada2D GetLaunchCoord() { if (GetShipOverallState(Player.Computer) != 0) { int number = randomizer.Next(6); while (shipsPlayer[number].GetLife == 0) { number = randomizer.Next(6); } return(shipsPlayer[number].Coordenada); } Coordenada2D coord = new Coordenada2D(-1, 0); return(coord); }