Example #1
0
 public void Init()
 {
     isPlaying = false;
     GoogleApi.Acsess();
     GoogleApi.array = GoogleApi.ReadEntries(Form2.sheetsArray[0]);
     ConfigureShips();
     ButtonStart();
     enemy = new Enemy(enemyMap, myMap, enemyButtons, myButtons);
 }
Example #2
0
 public int [,] ConfigureShips() //заполняем массив 0/1 в зависимости от наличия там текста
 {
     GoogleApi.array = GoogleApi.ReadEntries(Form2.sheetsArray[1]);
     for (int i = 0; i < Form1.mapSize; i++)
     {
         for (int j = 0; j < Form1.mapSize; j++)
         {
             if (GoogleApi.array[i, j] != "")
             {
                 myMap[i, j] = 1;
             }
             else
             {
                 myMap[i, j] = 0;
             }
         }
     }
     return(myMap);
 }