public override int Update(GameTime gameTime)
        {
            Game1.WindowText = "Press R to randomize, press space to solve";

            elapsedTime += gameTime.ElapsedGameTime;

            //Visualizing solve:
            if (solution != null && solution.Count != 0)
            {
                Game1.WindowText = "Solving";

                if (elapsedTime >= delayTime)
                {
                    game = solution.Dequeue();

                    elapsedTime = TimeSpan.Zero;
                }
            }

            //Randomizing:
            if ((solution == null || solution.Count == 0) && (InputManager.KeyboardState.IsKeyDown(Keys.R) && InputManager.LastKeyboardState.IsKeyUp(Keys.R)))
            {
                start.MatchGrid(game);
                start.randomizeGrid(25);
                game.matchGrid(start.grid);
            }

            //Solving:
            if (InputManager.KeyboardState.IsKeyDown(Keys.Space) && (solution == null || solution.Count == 0))
            {
                Game1.WindowText = "Loading";

                start.MatchGrid(game);
                Stack <Game26> result = BStar.SolvePuzzle(start, setupGrid(start.gridSizeX, start.gridSizeY));

                solution = new Queue <Game25>();

                Game25 last = null;

                while (result.Count > 0)
                {
                    var yoot = result.Pop();

                    Game25 yeet = new Game25(graphics, StaticVariables.Random, square, tile, font, yoot.grid, scale);

                    solution.Enqueue(yeet);
                    last = yeet;
                }

                start.MatchGrid(last);

                Game1.WindowText = "";
            }

            if ((solution == null || solution.Count == 0))
            {
                game?.update(InputManager.MouseState, InputManager.LastMouseState);
            }

            InputManager.LastKeyboardState = InputManager.KeyboardState;
            InputManager.LastMouseState    = InputManager.MouseState;

            base.Update(gameTime);

            return(0);
        }