fixed problem with crash if you click too early
This commit is contained in:
parent
e6e8aac616
commit
25b522ea8d
1 changed files with 5 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
|||
function playerCommand(player_id, command, args) {
|
||||
var p1_id = GGS.localStorage.getItem("p1_id");
|
||||
var p2_id = GGS.localStorage.getItem("p2_id");
|
||||
|
||||
if (command == "hi") {
|
||||
hi(player_id);
|
||||
} else if (command == "set") {
|
||||
} else if (command == "set" && p1_id && p2_id) {
|
||||
move(player_id, args);
|
||||
} else if (command == "new") {
|
||||
} else if (command == "new" && p1_id && p2_id) {
|
||||
newGame();
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue