Exemple #1
0
 private bool setPythonData()
 {
     // Send required data to the python environment
     return(CodeExecutionScript.setVariables(
                board,
                BoardXSize,
                BoardYSize,
                (int)playerPosition.x,
                (int)playerPosition.y,
                (int)goalPosition.x,
                (int)goalPosition.y
                ));
 }
Exemple #2
0
    // Read in current map and do initialization
    private void refreshGame()
    {
        // Do not allow code editing on every other level
        if (level % 2 == 0)
        {
            UIController.canEdit(false);
        }
        else
        {
            UIController.canEdit(true);
        }

        readMapFile("" + level);
        buildBoard();
        CodeExecutionScript.initChar();
        setPythonData();
    }