(no subject)

Feb 05, 2009 06:54

Reasons not to code at 6:55AM, episode 135 in a series of 358123:

private void populateChildrenOneSided(gameState toPopulate, int playerId, int plySoFar, int plyTotal)
        {
            toPopulate.playerToMove = playerId;
            toPopulate.children = findAllPotentialNewStates(toPopulate, false);
            if (plySoFar
            {
                foreach (gameState toExamine in toPopulate.children)
                    populateChildrenOneSided(toExamine, playerId, plySoFar++, plyTotal);
            }
        }

First one to point out the obvious* bug wins nothing! Clue : it recurses infinitely. Wonder why?

(*bug may only be obvious after it has been found)

code, idiot

Previous post Next post
Up