Android Bluetooth Rock Paper Scissors
I have created a tic tac toe app (mentioned in a question here). Now I use a rock paper scissors part in this. Right now how I have done it is have 3 buttons corresponding to rock,
Solution 1:
You want to learn about wait/notify
. You can have the first-to-send side sleep until it hears an answer from the other one. You'll want to make sure that your logic that decides whether to sleep is synchronized (with synchronized
, volatile
, or with an atomic variable) with the logic processing incoming events.
Post a Comment for "Android Bluetooth Rock Paper Scissors"