greed_game
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
greed_game [2018/12/14 10:20] – frchris | greed_game [2018/12/14 12:54] – frchris | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Greed Game: | + | **Greed Game** |
+ | The Greed Game is something I was told was invented by Rex Bogs. It is a fun party game that is based on " | ||
Overview: | Overview: | ||
Line 9: | Line 10: | ||
A " | A " | ||
* Everyone stands | * Everyone stands | ||
- | * a six-sided die is rolled twice, and the sum is everybody’s current score for this round. | + | * a six-sided die is rolled twice, and if a 2 was not rolled, |
* If you are happy with this score, sit down writing the number on your score card | * If you are happy with this score, sit down writing the number on your score card | ||
* If you want more, keep standing, and the die is rolled again | * If you want more, keep standing, and the die is rolled again | ||
Line 20: | Line 21: | ||
What if it is a 2? | What if it is a 2? | ||
- | If you are sitting down, this is merely the end of the round | + | * If you are sitting down, this is merely the end of the round |
- | If you are standing, you must score a zero for this round. | + | |
+ | {{ :: | ||
+ | [[https:// | ||
+ | |||
+ | **Solo Player** | ||
+ | Write a solo player app, that will play 5 rounds. | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | **Multi Player** | ||
+ | Write a program that will ask for the number of players, get a name for each player, and for each round each player whether they want to sit and bank the round' | ||
+ | After each round it should report the current point totals, and after 5 rounds announce the winner. | ||
Here are two BlueJ project zipped up with some code: | Here are two BlueJ project zipped up with some code: | ||
+ | |||
* {{ :: | * {{ :: | ||
* {{ :: | * {{ :: | ||
+ | **Greed Game Sim ** | ||
+ | |||
+ | Since the chances of rolling a 2 is 1/6, then why not modify the game that so two die are cast, and the " | ||
+ | |||
+ | It takes a while to play a game, so why not have the computer simulate the game many many times? We can then compare the original game to the modified game and see if the variation is about the same, or if one games seems different. | ||
+ | |||
+ | The code above can be changed to be verbose, and with any number of players (see the first two lines of the '' | ||
+ | |||
+ | **Greed Game Contest ** | ||
+ | |||
+ | You can now design and test Game strategies with this one. You can design subclasses of player that will sit down based on a strategy. | ||
+ | |||
+ | {{ https:// |
greed_game.txt · Last modified: 2023/03/02 13:43 by frchris