@@ -83,7 +83,6 @@ function initGame(gameKey, me, token, channelId, initialMessage) {
83
83
return state . userX === state . me ? 'X' : 'O' ;
84
84
}
85
85
86
- // [START move_in_square]
87
86
/**
88
87
* Send the user's latest move back to the server
89
88
*/
@@ -93,7 +92,6 @@ function initGame(gameKey, me, token, channelId, initialMessage) {
93
92
$ . post ( '/move' , { i : id } ) ;
94
93
}
95
94
}
96
- // [END move_in_square]
97
95
98
96
/**
99
97
* This method lets the server know that the user has opened the channel
@@ -111,7 +109,6 @@ function initGame(gameKey, me, token, channelId, initialMessage) {
111
109
$ . post ( '/delete' ) ;
112
110
}
113
111
114
- // [START remove_listener]
115
112
/**
116
113
* This method is called every time an event is fired from Firebase
117
114
* it updates the entire game state and checks for a winner
@@ -127,9 +124,7 @@ function initGame(gameKey, me, token, channelId, initialMessage) {
127
124
deleteChannel ( ) ; //delete the data we wrote
128
125
}
129
126
}
130
- // [END remove_listener]
131
127
132
- // [START open_channel]
133
128
/**
134
129
* This function opens a realtime communication channel with Firebase
135
130
* It logs in securely using the client token passed from the server
@@ -156,7 +151,6 @@ function initGame(gameKey, me, token, channelId, initialMessage) {
156
151
onOpened ( ) ;
157
152
// let the server know that the channel is open
158
153
}
159
- // [END open_channel]
160
154
161
155
/**
162
156
* This function opens a communication channel with the server
0 commit comments