// This is called when Space key is pressesd.
        public static void TestOnSpace(object sender, OnPathChangedEventArgs onPathChangedEventArgs)
        {
            PathFindingGUI pathFindingGUI = (PathFindingGUI)sender;

            if (onPathChangedEventArgs.pathFinding != null)
            {
                for (int i = 1; i < onPathChangedEventArgs.pathFinding.GetVisitedPath().Count; i++)
                {
                    PathNode searchNode = onPathChangedEventArgs.pathFinding.GetVisitedPath()[i];
                    SplashKit.FillRectangle(Color.LightBlue, searchNode.X * pathFindingGUI.CellSize + 2, searchNode.Y * pathFindingGUI.CellSize + 2, pathFindingGUI.CellSize - 2, pathFindingGUI.CellSize - 2);
                    if (i % 5 == 0)
                    {
                        pathFindingGUI.window.Refresh(60);
                    }
                }
                // If there is no path found, return.
                if (pathFindingGUI.pathNodes == null)
                {
                    return;
                }

                for (int i = 1; i < pathFindingGUI.pathNodes.Count - 1; i++)
                {
                    // Color Green, x is axis of pathNodes[i] in grid * cellSize, y is thr ordinate location of pathNodes[i] in grid * cellSize, with and height = cellSize
                    Util.FillSquare(Color.Yellow, pathFindingGUI.pathNodes[i].X, pathFindingGUI.pathNodes[i].Y, pathFindingGUI.CellSize);
                    pathFindingGUI.window.Refresh(60);
                }
                SplashKit.Delay(5000);
            }
        }
        // This is called when S key is pressesd.
        public static void TestOnSKey(object sender, OnPathChangedEventArgs onPathChangedEventArgs)
        {
            PathFindingGUI pathFindingGUI = (PathFindingGUI)sender;

            pathFindingGUI.StartX = onPathChangedEventArgs.pathFinding.GetGrid().GetColumnNumber(SplashKit.MousePosition());
            pathFindingGUI.StartY = onPathChangedEventArgs.pathFinding.GetGrid().GetRowNumber(SplashKit.MousePosition());
            if (onPathChangedEventArgs.pathFinding.FindPath(pathFindingGUI.StartX, pathFindingGUI.StartY, pathFindingGUI.EndX, pathFindingGUI.EndY) != null)
            {
                pathFindingGUI.pathNodes = onPathChangedEventArgs.pathFinding.FindPath(pathFindingGUI.StartX, pathFindingGUI.StartY, pathFindingGUI.EndX, pathFindingGUI.EndY);
            }
            onPathChangedEventArgs.pathFinding.GetGrid().PrintGrid();
        }