Ejemplo n.º 1
0
    virtual protected void DoClick()
    {
        //pick stone and click it

        PlayerStone[] legalStones = GetLegalMoves();
        if (legalStones == null || legalStones.Length == 0)
        {
            //we have no legal moves how did we get here?
            //we might still be in a delayed corutine somewhere?
            return;
        }
        //basic AI simply picks a legal move at random

        PlayerStone pickedStone = PickStoneToMove(legalStones);

        pickedStone.MoveMe();
    }
Ejemplo n.º 2
0
    virtual protected void DoClick()
    {
        //pick a stone to move, then "click" it.


        PlayerStone[] legalStones = GetLegalMoves();

        if (legalStones == null || legalStones.Length == 0)
        {
            //we have no legal moves. how did we get here?
            //we might still be in a delayed coroutine somewhere. let's no freak out.
            return;
        }
        //basicAi simply picks a legal move at  random.
        PlayerStone pickStone = legalStones[Random.Range(0, legalStones.Length)];

        pickStone.MoveMe();
    }
Ejemplo n.º 3
0
    virtual protected void DoClick()
    {
        //pick a stone to move.



        PlayerStone[] legalStones = GetLegalMoves();

        if (legalStones == null || legalStones.Length == 0)
        {
            //we have no legal moves.
            return;
        }
        // picks a legal move at  random.
        PlayerStone pickStone = PickStoneToMove(legalStones);

        pickStone.MoveMe();
    }
Ejemplo n.º 4
0
    virtual protected void DoClick()
    {
        // Pick a stone to move, then "click" it.


        PlayerStone[] legalStones = GetLegalMoves();

        if (legalStones == null || legalStones.Length == 0)
        {
            // We have no legal moves.  How did we get here?
            // We might still be in a delayed coroutine somewhere. Let's not freak out.
            return;
        }

        // BasicAI simply picks a legal move at random

        PlayerStone pickedStone = PickStoneToMove(legalStones);

        pickedStone.MoveMe();
    }