Esempio n. 1
0
        public Computer_Player(string n, bool h) : base(n, h)
        {
            opponents_board = new GameElement[10, 10];
            for (int i = 0; i <= 9; i++)
            {
                for (int u = 0; u <= 9; u++)
                {
                    opponents_board[u, i] = new GameElement(Type.Wasser, Status.tba)
                    {
                        Y = u, X = i
                    };
                }
            }

            hit_ships        = new List <GameElement>();
            fire_counter     = 0;
            submarine_is_hit = false;
        }
Esempio n. 2
0
 public Player(string n, bool h)
 {
     name  = n;
     human = h;
     board = new GameElement[10, 10];
     for (int i = 0; i <= 9; i++)
     {
         for (int u = 0; u <= 9; u++)
         {
             board[u, i] = new GameElement(Type.Wasser, Status.tba)
             {
                 X = i, Y = u, ship = null
             };
         }
     }
     ships    = new Ship[6];
     ships[0] = new Ship(Type.UBoot);
     ships[1] = new Ship(Type.Zerstörer);
     ships[2] = new Ship(Type.Zerstörer);
     ships[3] = new Ship(Type.Kreuzer);
     ships[4] = new Ship(Type.Schlachtschiff);
     ships[5] = new Ship(Type.Flugzeugtraeger);
 }