Greedy Pigs is a 2-player dice game of chance and expectation, greed and strategy.
Try your hand at the game - Greedy Pigs.
- Atom - Text editor.
- Boostrap - Content library.
- jQuery - Javascript library.
- Owl Carousel - jQuery plugin.
- wow.JS - jQuery plugin.
User Inputs | Example Outputs |
---|---|
When it receives: | It should return: |
User clicks "Play". | User is taken to the game console. |
Player "Rolls" dice. | Dice face displays a random number from 1-6. |
Player rolls a number from 2-6. | The number is added to Player's present score, Player may roll dice again. |
Player rolls a 1. | The player's present score displays 0, Console displays "too bad!", Play moves to next Player. |
Player holds/chooses to forfeit roll. | Points for the round are added to Player's total counter, Play moves to next Player. |
Player's total score is >== 100 | Player wins the game, game play is disabled, Console displays "Player " " wins!". |
When player 1 is playing. | Player 2 cannot Play, Player 2's console is disabled. |
When Player 2 is playing. | Player 1 cannot Play, Player 2's console is disabled. |
User clicks "New Game". | Game is reset/refreshed, Both counters display 0, Prompt player 1 to start. |
Optional Rules | |
Player rolls a hat-trick (three "6's" in a row) | The player's present score displays 0, Console displays "too bad!", Play moves to next Player. |
Limit the number of rounds to 10 | Game ends after the set number of rounds |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
- Loise Mwangi - Initial work - greedy pigs
- Flaticon - Avatar and dice images used.
- Pencimation - The animated video used.
This project is licensed under the MIT License - see the LICENSE.md file for details