GoogleChromeLabs / proxx

A game of proximity
https://proxx.app
Apache License 2.0
1.31k stars 124 forks source link

Invalid initial timer #475

Closed bitdryvr closed 5 years ago

bitdryvr commented 5 years ago

Debug info

System Information Version: 1.0.7 Motion: false Supports WebGL: true Feature Phone: no Standalone Mode: no Screen Width: 412px Screen Height: 732px DPR: 2 Device Memory: 4 Concurrency: 8 UA: Mozilla/5.0 (Linux; Android 9; Pixel 2) AppleWebkit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36

Describe the bug

Initial timer (before the game starts) is invalid and might be rolling over in the negative direction

To Reproduce

Use Case #1:

  1. Start a new game with a width of 5 and a height of 5 and 16 mines (the maximum possible)
  2. See invalid initial timer of 26004659:59

Use Case #2:

  1. Start a new game with a width of 5 and a height of 5 and 15 mines
  2. See invalid initial timer of 00:04

Expected behavior

Correct Case -

  1. Start a new game with a width of 5 and a height of 5 and 14 mines
  2. See correct initial timer of 00:00
jakearchibald commented 5 years ago

The first bug is a dupe of https://github.com/GoogleChromeLabs/proxx/issues/431.

The timer initially shows the best time for a particular board. Is that what you're seeing?

bitdryvr commented 5 years ago

Then let's just consider Use Case #1 going forward and forget about Use Case #2.

I did not realize the timer was showing the best time ever for that grid. Is there some way to note that on-screen or in the instructions?

(And while we are looking at the instructions or the topbar, what does the fraction on the left mean? Perhaps labels or instruction changes can help explain.)

With a 5x5 with 16 mines, only one press is needed to win the game. That run should (in theory) be the fastest, but these three different runs show times of 26005974:41, 26005975:26, and 26005975:38. None of them beat the best "undefined" or "infinity" run of 26004659:59 that occurs for a totally new grid. I never had an intentional run of 26004659:59 so that one is invalid.