Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        public bool BoardMouse(float mouseX, float mouseY)
        {
            Coordenada2D punto = BoardSelection(mouseX, mouseY);

            if (punto.X != -1)
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        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);
        }