inciteco / tug-of-war

0 stars 0 forks source link

Some games end too early #3

Closed aaronbuchanan closed 7 years ago

aaronbuchanan commented 7 years ago

check out line 61!

inciteco commented 7 years ago

https://gist.github.com/inciteco/2edc60e3f5d0eed6d27539536a5b73f0

inciteco commented 7 years ago

https://gist.github.com/inciteco/27a1196d2f7704d5e32865ffeb4ad3af

inciteco commented 7 years ago

https://gist.github.com/inciteco/ee1ceea2bbce28af7671f29db7d6fa7c

inciteco commented 7 years ago

iPhone 6+ - 10.3.3

[Error] WebSocket connection to 'wss://s-usc1c-nss-219.firebaseio.com/.ws?v=5&ns=popeyes-tug-o-war' failed: WebSocket is closed due to suspension.
[Error] WebSocket connection to 'wss://s-usc1c-nss-219.firebaseio.com/.ws?v=5&ns=popeyes-tug-o-war' failed: WebSocket is closed due to suspension.
[Log] [GameService] – "init" (GameService.js, line 368)
[Error] Failed to load resource: the server responded with a status of 404 (HTTP/2.0 404) (lodash.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (HTTP/2.0 404) (firebase.js.map, line 0)
[Log] Phaser v2.8.3 | Pixi.js | Canvas | WebAudio | http://phaser.io (phaser.min.js, line 3)
[Error] Failed to load resource: the server responded with a status of 404 (HTTP/2.0 404) (phaser.map, line 0)
[Log] [GameService] (2) (GameService.js, line 368)
"player ready:"
{key: "V1jSrs3FCXgIw3SOnQ8kMhj2WNA2", image: "https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/10…g?oh=e8ab0b446a54cd35d4962f54d29f533e&oe=5A1DC633", name: "Jennifer Zakur"}
[Log] [GameService] – "findOpponent" (GameService.js, line 368)
[Log] [GameService] – "findExistingGame" (GameService.js, line 368)
[Log] [GameService] – "most recent game already has a player!" (GameService.js, line 368)
[Log] [GameService] – "starting a new new game instead..." (GameService.js, line 368)
[Log] [GameService] – "createNewGame" (GameService.js, line 368)
[Log] [GameService] (2) (GameService.js, line 368)
"startGameSession"
e {repo: t, path: t, ee: t, ne: false, then: function, …}
[Log] [GameService] (2) (GameService.js, line 368)
"gameUpdate"
{player_1: {image: "https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/10…g?oh=e8ab0b446a54cd35d4962f54d29f533e&oe=5A1DC633", key: "V1jSrs3FCXgIw3SOnQ8kMhj2WNA2", name: "Jennifer Zakur"}, player_1_joined_at: "2017-08-30T19:42:45.414Z", player_1_score: 0}
[Warning] FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": "player_2" at /games/2017-08-30 to your security rules for better performance  (firebase.js, line 320)
[Log] [GameService] (2) (GameService.js, line 368)
"createNewGame done! game.key:"
"-KsoehV687XAg5SYVSQr"
[Log] [GameService] – "switching to simulated opponent" (GameService.js, line 368)
[Log] [GameService] (2) (GameService.js, line 368)
"gameUpdate"
{player_1: {image: "https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/10…g?oh=e8ab0b446a54cd35d4962f54d29f533e&oe=5A1DC633", key: "V1jSrs3FCXgIw3SOnQ8kMhj2WNA2", name: "Jennifer Zakur"}, player_1_joined_at: "2017-08-30T19:42:45.414Z", player_1_score: 0, player_2: {image: "assets/images/botAnnie.png", key: "-annie-bot-", name: "Annie"}, player_2_joined_at: "2017-08-30T19:42:55.437Z", …}
[Log] [GameService] (2) (GameService.js, line 368)
"setOpponent"
{image: "assets/images/botAnnie.png", key: "-annie-bot-", name: "Annie"}
[Log] [GameService] (2) (GameService.js, line 368)
"remote player arrived:"
{image: "assets/images/botAnnie.png", key: "-annie-bot-", name: "Annie"}
[Log] Opponent has arrived: – {image: "assets/images/botAnnie.png", key: "-annie-bot-", name: "Annie"} (waitforplayer.js, line 159)
[Log] [GameService] (2) (GameService.js, line 368)
"gameUpdate"
{game_end_time: "2017-08-30T19:42:45.474Z", game_start_time: "2017-08-30T19:43:00.473Z", player_1: {image: "https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/10…g?oh=e8ab0b446a54cd35d4962f54d29f533e&oe=5A1DC633", key: "V1jSrs3FCXgIw3SOnQ8kMhj2WNA2", name: "Jennifer Zakur"}, player_1_joined_at: "2017-08-30T19:42:45.414Z", player_1_score: 0, …}
[Log] [GameService] – "schedule found!" (GameService.js, line 368)
[Log] [GameService] (2) (GameService.js, line 368)
"starting countdown as"
"host"
[Log] [GameService] (2) (GameService.js, line 368)
"countdown started, seconds remaining:"
4.99
[Log] [GameService] – "no scores found yet" (GameService.js, line 368)
[Log] [GameService] – "no scores found yet" (GameService.js, line 368)
[Log] [GameService] – "done switched the game to simulated!" (GameService.js, line 368)
[Log] [GameService] – "start scheduled" (GameService.js, line 368)
[Log] Player 2 pic load completed (waitforplayer.js, line 171)
[Log] [GameService] – "onGameplayStart › user should start calling game.makeMove(<Number>) now" (GameService.js, line 368)
[Log] [WaitForPlayerState]: leaving waitforplayer state (waitforplayer.js, line 119)
[Log] [GameService] (3) (GameService.js, line 368)
"game end scheduled for"
-15.011
"seconds from now"
[Log] [GameService] – "endGame called" (GameService.js, line 368)
[Log] [GameService] – "final game state:" (GameService.js, line 368)
[Log] [GameService] (2) (GameService.js, line 368)
"- finalScore?:"
0
[Log] [GameService] (2) (GameService.js, line 368)
"- tie?:"
true
[Log] [GameService] (2) (GameService.js, line 368)
"- playingAsPlayer1?:"
true
[Log] [GameService] (2) (GameService.js, line 368)
"- finalGameState.last_to_move?:"
undefined
[Log] [GameService] (2) (GameService.js, line 368)
"- playerWon?:"
false
[Log] [GameService] (2) (GameService.js, line 368)
"gameUpdate"
{finalScore: 0, game_end_time: "2017-08-30T19:42:45.474Z", game_ended: true, game_ended_at: "2017-08-30T19:43:00.639Z", game_start_time: "2017-08-30T19:43:00.473Z", …}
[Log] [GameService] (2) (GameService.js, line 368)
"game has ended! playerWon:"
false
[Log] [GameService] – "clearAllTimers" (GameService.js, line 368)
[Log] [GameService] (2) (GameService.js, line 368)
"onGameplayEnd, user won?"
false
[Log] [WaitForPlayerState]: leaving waitforplayer state (waitforplayer.js, line 119)
[Log] [GameService] – "user should be taken to results screen" (GameService.js, line 368)
[Log] [PlayState]: onGameplayEnd, user won? (2) (play.js, line 183)
false
false
[Log] [GameService] – "endGameSession" (GameService.js, line 368)
[Log] [GameService] – "game has ended, aborting updates!" (GameService.js, line 368)
[Log] [GameService] – "game conclusion saved!" (GameService.js, line 368)