Esempio n. 1
0
        public Game(string path)
        {
            int[] numbers = FileReaderForKnuckles.ReadingFile(path);
            int   size    = (int)Math.Sqrt(numbers.Length);

            this.field = new int[size, size];
            FillingFromSymbolsFromFile(path);
        }
Esempio n. 2
0
        private void FillingFromSymbolsFromFile(string path)
        {
            int[] numbers = FileReaderForKnuckles.ReadingFile(path);
            int   count   = 0;

            for (int i = 0; i < field.GetLength(0); i++)
            {
                for (int j = 0; j < field.GetLength(1); j++)
                {
                    field[i, j] = numbers[count];
                    count++;
                }
            }
            ChangeKnuckles();
        }