Пример #1
0
    private static void Main(string[] args)
    {
        int[] inputs = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        var   light  = new Light(inputs[0], inputs[1]);
        var   thor   = new Thor(inputs[2], inputs[3]);

        while (true)
        {
            thor.Move(light);
            thor.TellDirection();
        }
    }
Пример #2
0
    private static void Main(string[] args)
    {
        int[] inputs = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        var light = new Light(inputs[0], inputs[1]);
        var thor = new Thor(inputs[2], inputs[3]);

        while (true)
        {
            thor.Move(light);
            thor.TellDirection();
        }
    }
Пример #3
0
    static void Main(string[] args)
    {
        string[] inputs = Console.ReadLine().Split(' ');
        int lightX = int.Parse(inputs[0]); // the X position of the light of power
        int lightY = int.Parse(inputs[1]); // the Y position of the light of power
        
        var thor = new Thor( x: inputs[2], y: inputs[3] );

        // game loop
        while (true)
        {
            int remainingTurns = int.Parse(Console.ReadLine());

            thor.Move( x: lightX, y: lightY );
        }
    }