Discussion:
tic tac toe , multiplayer via bluetooth
benjamin varghese
2013-08-30 15:39:47 UTC
Permalink
hey !

am new to android and was using the sample api's using the bluetooth chat
code i created a tic tac toe game,

i'm able to connect two devices via bluetooth and can use the bluetooth
name as the opponent's name

eg if my device name is "ABC" and opponents "DEF"
then the names in my device will be You : 0 DEF: 0

opponets device will have names YOU : 0 ABC : 0
( the score is initially set to 0).

*where the problem is :*

each of these device consider it as player 1 and can make a move. But i
want to restrict it, the player who first tries to connect the device gets
the 1st move and then the other.

how can i deal with the situation ??? please help
--
You received this message because you are subscribed to the Google Groups "Android Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-discuss+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...