Ejemplo n.º 1
0
        public void restartLevel()
        {
            moves = 0;
            game.restartPuzzle();
            Tuple <int, int> next = game.getNextLight();

            //turn off all lights
            for (int r = 0; r < 5; r++)
            {
                for (int c = 0; c < 5; c++)
                {
                    lightArray[r, c].lightOff();
                }
            }
            redraw();
            while (next.Item1 != 5)
            {
                lightArray[next.Item1, next.Item2].reverseLight();
                next = game.getNextLight();
            }
            redraw();
        }