/EscapeToJapan

Primary LanguageJavaScriptMIT LicenseMIT

EscapeToJapan

I want to do nothing...

Abstract

If you open index.html and click START button, the roulette starts. And then you click STOP button, the roulette stops with randomness.
Once you click Blue button (before click START button), that button changes to white button and cannot be selected by roulette. Of course, if you click white button, that button changes to blue button and can be selected.

When the roulette stops, selected button changes to red and link to Google appears. (To visit Google, you need to connect Internet.)

Parameters

Following parameters are defined in the main.js:

  • ROULETTE_SPEED_DEFAULT
    • The roulette speed until you click STOP button.
  • ROULETTE_SPEED_UPPER_LIMIT
    • The slowest roulette speed after you click STOP button.
  • TIME_TO_CLEAR_MIN
    • The shortest time to decelerate roulette speed after you click STOP button.
  • TIME_TO_CLEAR_MAX
    • The longest time to decelerate roulette speed after you click STOP button.
    • Actually, the real maximum time is not the same as this.
  • TIME_TO_CLEAR_ADDED_MAX
    • The maximum time added to inteval time (clear setTimeout).

Note that roulette speed and the time to clear timeoutID is not the same parameters.

Coding Style

See JavaScript style guide (JP) by the Mozilla Developer Network.

License

  • This program is released under the MIT license.
  • Bootstrap is released under the MIT license, by Twitter, Inc.
  • jQuery is released under the MIT license (see here), by The jQuery Foundation.
    • jQuery is used in Bootstrap.

Others

  • This program is based on the idea of ダーツの旅.
  • 経県 might be helpful to select which prefectures to nominate.