Esempio n. 1
0
    public Vector2?ProposeMove(GameObject[,] gameBoard, CompStrategy compStrategy)
    {
        //Debug.Assert (validMoves.Count == 0, "ERROR::ProposeMove: validMoves List not empty in beginning");

        Vector2?proposedMove = new Vector2();

        switch (compStrategy)
        {
        case CompStrategy.RANDOM:
            proposedMove = RandomMode(gameBoard);
            break;

        case CompStrategy.GREEDY:
            proposedMove = GreedyMode(gameBoard);
            break;

        case CompStrategy.CALCULATING1:
            proposedMove = Calculating1Mode(gameBoard);
            break;

        default:
            Debug.LogError("ERROR::ProposeMove: Unexpected condition reached");
            break;
        }

        //validMoves.Clear ();
        return(proposedMove);
    }
Esempio n. 2
0
    void OnEnable()
    {
        opponent     = (Player)PlayerPrefs.GetInt("opponent");
        compStrategy = (CompStrategy)PlayerPrefs.GetInt("strategy");

                #if UNITY_EDITOR
        debug1Text.text = "Difficulty: " + compStrategy;
                #endif

                #if UNITY_ANDROID
        debug1Text.text = "";
                #endif
    }