File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -299,15 +299,15 @@ function handleTurnChange (turnData) {
299299 if ( socket . id === previousPlayerId && turnData . gist != null ) {
300300 console . log ( "User's turn is about to end." ) ;
301301
302- // If the current player is about to change ,
303- if ( currentPlayerId !== previousPlayerId ) {
302+ // If the current player does NOT own the current Gist ,
303+ if ( userName !== turnData . gist . owner ) {
304304
305305 //console.log("handleTurnChange: now forking and editing gist " + turnData.gist.id);
306306
307- // fork and edit the current gist on behalf of previous player and send new ID to server
307+ // Fork/ edit current Gist on behalf of player whose turn is about to end, and send new ID to server
308308 forkAndEditGist ( turnData . gist . id , editor . getValue ( ) ) ;
309309
310- // Otherwise, JUST EDIT the current gist on behalf of previous player and send new ID to server
310+ // Otherwise, JUST EDIT the current Gist and send new ID to server
311311 } else {
312312
313313 //console.log("handleTurnChange: now editing gist " + turnData.gist.id);
You can’t perform that action at this time.
0 commit comments