Esempio n. 1
0
 private void Update()
 {
     if (_inputManager.AttackInput)
     {
         _basicAttack.Attack();
     }
 }
        public List <CellOutcome> visit(BasicAttack basicAttack)
        {
            //goes through all the cells with a 50% chance to hit each one of them
            Random rnd = new Random();

            for (int i = 0; i < 15; i++)
            {
                for (int j = 0; j < 15; j++)
                {
                    if (rnd.Next(2) == 0)
                    {
                        outcomes.AddRange(basicAttack.Attack(i, j, cells, ships));
                    }
                }
            }
            return(outcomes);
        }