Game design flaw, need help investigating

Posted by Snake on Stack Overflow See other posts from Stack Overflow or by Snake
Published on 2012-10-19T16:52:40Z Indexed on 2012/10/19 17:00 UTC
Read the original article Hit count: 140

Filed under:
|

I am not sure if I will be able to get help here but I would give it a shot. The problem is I dont know where the problem is. I have a cards game, in which when you "human" play by dragging a card, then at the end of card being dragged, a handler using postExecute is called with delay of 0.5 sec to start the next player in turn (which is a bot)

The bot chooses the color and plays it and at the end of the animation (the card moving to the middle) a handler is started for the next bot and so on. Once the play reaches again to the human player, it waits for his touchs to drag the crad and start the cycle again.

The problem that in production, sometimes I am getting errors. The error is resulting in somehow messing up the sequence which ends up with players having more cards than others.

After investigation, I found that the transition from human to bot is the problem. Somehow, the transition is happening twice (meaning handler calling post execute twice and the bot is playing twice and everything is messed up).

Its been mutliple months and I can't reproduce it (to fix it) and I cna't figure out why this is happeneing?

ANY IDEA how I can go after it? How can I get more info about or how can I solve something like that? any pointer would help me

© Stack Overflow or respective owner

Related posts about android

Related posts about game