All pastes #595887 Raw Edit

Miscellany

public text v1 · immutable
#595887 ·published 2007-06-29 18:17 UTC
rendered paste body
private void ComputerMove()
        {
            //MessageBox.Show("comp");
            LoadRandomWind();
            resetHurts();


            List<Move> bla = Comp.GetShootingAngle(map, unitList[0].Position, unitList[1].Position, bufferMap);
            int minCounter = Int16.MaxValue;
            double angle = 0;
            double v0 = 0;
            foreach (Move s in bla)
            {
                //    System.Console.WriteLine(s.obsticle.ToString());
                if (minCounter > s.obsticle)
                {
                    minCounter = s.obsticle;
                    angle = s.angle;
                    v0 = s.v0;
                }
            }

            unitList[1].barrelAngle = angle;
            bulletList = w.getBullet(unitList[1].getLineToDraw()[1], v0, angle);
            timerBullet.Enabled = true;
            BulletLoop();
            RepaintMap();
            mapPictureBox.Invalidate();

           // resetHurts();
           // if (checkStateOfGame() != 2) return;
           //LoadRandomWind();
           // turn = Player.Human;
        }