JetLagShootTheGap is a web tool for analyzing the probabilities of winning for the Snaker in the game Shoot the Gap from JetLag: The Game, Season 14, Episode 3.
A live example is hosted at: https://shootthegap.krychlic.com
The app lets you explore different probability models and visualize outcomes for the Snaker and Blockers, based on the rules of the game:
- Three players: one Snaker and two Blockers. Each collects a number of items.
- The winner is the player who collects the middle number of items.
- Blockers cannot strategize together.
- Ties are handled as described in the episode or, if ambiguous, as a tie or loss for the Snaker.
The tool provides interactive controls for maximum items, probability of collecting, and model selection, and displays the probability distributions for each possible move.
- Interactive Probability Charts: Visualize the probability of each result for every possible move.
- Multiple Probability Models: Choose from Binomial, Exponential decay, Poisson, or Uniform models.
- Modern UI: Responsive, dark-mode friendly interface using Tailwind CSS.
- Game Rule Reference: In-app modal explains the rules and edge cases.
pnpm installThe pnpm run dev command will bundle Tailwind CSS on the fly, but does not start a development server.
To view your app locally while developing, we recommend:
- Install the Live Server extension in VS Code.
- Right-click on
src/index.htmland select "Open with Live Server".
You can also use a tool like serve:
pnpm add -g serve
serve srcThis will serve the src/ directory at a local address (e.g., http://localhost:3000).
pnpm run buildThe production-ready files will be output to the dist/ directory (or as configured).
/dist # Production build output
/src # Main application source
/js # JavaScript modules (chart, probability, UI, etc.)
index.html # Main HTML entry point
index.css # Main CSS
tailwind.css # Tailwind CSS entry
build.mjs # Build script
We welcome contributions! To get started:
- Fork the repository and clone your fork.
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
- Make your changes and ensure code quality and formatting.
- Test your changes locally.
- Commit and push your branch:
git add . git commit -m "Describe your change" git push origin feature/your-feature-name
- Open a Pull Request on GitHub and describe your changes.
- Use clear, descriptive commit messages.
- Follow the existing code style and structure.
- Write modular, maintainable code.
- Add comments and documentation where helpful.
This project is licensed under the MIT License.
For questions or suggestions, please open an issue or contact the maintainer.