You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.3 KiB
54 lines
2.3 KiB
6 years ago
|
# Shell Game
|
||
|
|
||
|
**Tier:** 3-Advanced
|
||
|
|
||
|
A Shell game is a classic gambling game that dates back to ancient Greece.
|
||
|
Playing it requires three shells, a pea, hand dexterity by the operator, and
|
||
|
keen observation skills on the part of the player. It's also a classic con
|
||
|
game since its easy for the operator to swindle the player. Thank goodness
|
||
|
the latter isn't our intent with this app.
|
||
|
|
||
|
This Shell game is intended to provide a graphical interface to the classical
|
||
|
shell game and to provide the player with an honest game to play. Our game
|
||
|
draws three shells on the canvas along with the pea, moves the pea under one,
|
||
|
of the shells, and shuffles the shells for a specific interval of time. The
|
||
|
user must then click on the shell she thinks the pea is hidden under. The user
|
||
|
is allowed to continue guessing until the pea is located.
|
||
|
|
||
|
## User Stories
|
||
|
|
||
|
- [ ] User can see the canvas with three shells and the pea.
|
||
|
- [ ] User can click the shell the pea is to be hidden under.
|
||
6 years ago
|
- [ ] User can see the pea move under the shell that's been clicked.
|
||
6 years ago
|
- [ ] User can click on a 'Shuffle' button to start an animated shuffling of
|
||
|
the shells for 5 seconds.
|
||
|
- [ ] User can click on the shell she believes the pea is hidden under when
|
||
|
the animation stops.
|
||
|
- [ ] User can see the shell that has been clicked rise to reveal if the pea
|
||
|
is hidden under it.
|
||
|
- [ ] User can continue clicking shells until the pea is found.
|
||
|
- [ ] User can see a congratulations message when the pea is located
|
||
|
- [ ] User can start a new game by clicking a shell the pea is to be hidden
|
||
|
under (step #2 above). The steps above are then repeated.
|
||
|
|
||
|
## Bonus features
|
||
|
|
||
|
- [ ] User can see a score panel containing the number of wins and the
|
||
|
number of games played.
|
||
|
- [ ] User can see the number of games played increase when the pea is hidden
|
||
|
under a shell
|
||
|
- [ ] User can see the number of wins incremented when the pea is found on
|
||
|
the first guess.
|
||
|
- [ ] User can see the shell hiding the pea to animate (color, size, or
|
||
|
some other effect) when it is clicked (a correct guess).
|
||
|
|
||
|
## Useful links and resources
|
||
|
|
||
|
- [Shell Game (Wikipedia)](https://en.wikipedia.org/wiki/Shell_game)
|
||
|
- [Javascript HTML DOM Animation](https://www.w3schools.com/js/js_htmldom_animate.asp)
|
||
|
- [p5js Animation Library](https://p5js.org/)
|
||
|
|
||
|
## Example projects
|
||
|
|
||
|
[Shell Game](https://codepen.io/RedCactus/pen/dwEjXy)
|