Exemplo n.º 1
0
 private static void FindNikoladze(int row, int col)
 {
     if (room[row][col] == 'N')
     {
         nikoladze = new Nikoladze(row, col);
     }
 }
Exemplo n.º 2
0
        public void StartMission()
        {
            Nikoladze.FindPosition(matrix);
            Sam.FindPostion(matrix);

            while (Sam.Directions.Count > 0)
            {
                Guard.MoveGuards(matrix);
                Sam.IsAlive(matrix);

                var direction = Sam.Directions.Dequeue();
                Sam.Move(matrix, direction);

                if (Sam.Row == Nikoladze.Row)
                {
                    Nikoladze.SamWon(matrix);
                    Sam.MissionOver("Nikoladze killed!", matrix);
                }
            }
        }