Esempio n. 1
0
        public void Run()
        {
            _screen.Display("Welcome to Klootzakken ASCII");

            _screen.Log("Start main loop!");
            _screen.Exit += Exit;
            _screen.Display("Type 'exit' to exit the application");
            while (true)
            {
                switch (_stateMachine.State)
                {
                case StateMachine.States.Login:
                    _screen.Display("Enter a token to continue:");
                    _stateMachine.LoggedIn("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiI5NmM4N2E2MC1hNWEzLTRjMGUtYjA1Ny0wYTlmOTU4NDZlZGUiLCJ1bmlxdWVfbmFtZSI6InJvYmJlcnQuZHJpZXNzZW5AaGlnaHRlY2hpY3QubmwiLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjliNjYzMDNjLWI5MjAtNDdkZS1hMDFmLTMxZWMxOGQwOWEyZCIsIm5iZiI6MTQ5MzgzMDg3NiwiZXhwIjoxNDk2NTA5Mjc2LCJpYXQiOjE0OTM4MzA4NzYsImlzcyI6IkRpdnZlcmVuY2UuY29tIEtsb290emFra2VuIiwiYXVkIjoiRGVtb0F1ZGllbmNlIn0.1Q5BSz3xZXebNvddSG4duG0cWLwA-4Ao1DILHsPGu_k");
                    break;

                case StateMachine.States.Lobby:
                    _lobby.Do();
                    break;

                case StateMachine.States.InGame:
                    _game.Do();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }