Example #1
0
        static private void GameCommand(ConsoleKey key)
        {
            switch (key)
            {
            case ConsoleKey.UpArrow:
                ActionControl.MoveCommand(direction.up);
                break;

            case ConsoleKey.DownArrow:
                ActionControl.MoveCommand(direction.down);
                break;

            case ConsoleKey.RightArrow:
                ActionControl.MoveCommand(direction.right);
                break;

            case ConsoleKey.LeftArrow:
                ActionControl.MoveCommand(direction.left);
                break;

            case ConsoleKey.I:
                gameState = GameState.inventory;
                ViewOnConsole.View(gameState);
                break;
            }
        }
        static public void DistributeCommand(ConsoleKey key)
        {
            switch (key)
            {
            case ConsoleKey.UpArrow:
                ActionControl.MoveCommand(direction.up);
                break;

            case ConsoleKey.DownArrow:
                ActionControl.MoveCommand(direction.down);
                break;

            case ConsoleKey.RightArrow:
                ActionControl.MoveCommand(direction.right);
                break;

            case ConsoleKey.LeftArrow:
                ActionControl.MoveCommand(direction.left);
                break;

            case ConsoleKey.I:
                ActionControl.ShowInventory();
                break;
            }
        }