Skip to content

Commit

Permalink
Fast mode, and add details for cheat
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgidden committed Oct 13, 2024
1 parent 42047c1 commit abc9b40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
// The number of milliseconds between requested frames (plus the processing
// time for the current frame, so this will always be more than 50ms as
// frame refresh is triggered from synchronous code.
const frameStep = 50;
const frameStep = (window.location.hash??'').includes('fast')?0:50;

// Testing: this will fix it to a mode where "45,89" will be a direct hit.
// "45,95" will cause a city hit.
// "45,95" will cause a city hit. "45,78" is a direct hit from the other side.
// Useful for trying out changes.
const testing = window.location.hash === '#cheat';
const testing = (window.location.hash??'').includes('cheat');
const random1 = () => testing ? 0.5 : Math.random();
const random2 = () => testing ? 0.75 : Math.random();
const random3 = () => testing ? 0.25 : Math.random();
Expand Down

0 comments on commit abc9b40

Please sign in to comment.