User Tools

Site Tools


greed_game

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
greed_game [2018/12/14 12:53] frchrisgreed_game [2023/03/02 13:43] (current) 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 "pressing your luck" on five rounds of throwing a die. The points accumulate until the number 2 is cast. Before the die is cast, players have an option of banking the total. If they think the next roll is not a 2, they keep standing. But if it is a 2, they get zero points for that round.+ 
 +I was told the Greed Game was invented by Rex Bogs. It is a fun party game that is based on "pressing your luck" on five rounds of throwing a die. The points accumulate until the number 2 is cast. Before the die is cast, players have an option of banking the total. If they think the next roll is not a 2, they keep standing. But if it is a 2, they get zero points for that round.
  
 Overview: Overview:
Line 28: Line 28:
 {{ ::screen_shot_2018-12-14_at_7.35.27_am.png?direct&400 |}} {{ ::screen_shot_2018-12-14_at_7.35.27_am.png?direct&400 |}}
  
-[[https://www.random.org/dice/?num=2|Roll Dice]]+[[https://www.random.org/dice/?num=2|Roll Dice @ random.org]]
  
 **Solo Player** **Solo Player**
-Write a solo player app, that will play 5 rounds.  It will roll the die twice.  If a 2 was rolled, the round is over and if the player is standing, they get a zero for the round.  If no 2 was rolled, the sum is added to the round total. The player is asked if they want to bank the round total, or remain standing and try rolling again.  This continues until either a 2 is rolled or the player sits and banks the round total.  Do this again until 5 rounds are played.  Report the grand total for the five rounds.+Write a solo player app, that will play 5 rounds.  It will roll the die twice.  If a 2 was rolled, the round is over and if the player was standing, they get a zero for the round.  If no 2 was rolled, the sum is added to the round total. The player is asked if they want to bank the round total, or remain standing and try rolling again.  This continues until either a 2 is rolled or the player sits and banks the round total.  Do this again until 5 rounds are played.  Report the grand total for the five rounds. 
 + 
 +Below are zipped BlueJ projects to help you get started.  The first is a simple text based version that just has the starter code for asking questions and getting the user responses from the keyboard.  The second is a GUI version that shows dice and has two buttons "SIT" (to bank the round total) or "STAND" to roll the dice again.   
  
 {{ ::greed_game_solo.zip |}} {{ ::greed_game_solo.zip |}}
Line 46: Line 48:
  
   * {{ ::greed_game.zip |}}   * {{ ::greed_game.zip |}}
-  * {{ ::greed_game_contest.zip |}}+  * {{ ::greed_game_contest.zip |Greed Game Contest.zip}} Last Updated March 2, 2023
  
 **Greed Game Sim ** **Greed Game Sim **
Line 58: Line 60:
 **Greed Game Contest ** **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.  A timid player would always sit down right away, while a greedy player will press his or her luck.  +You can now design and test Game strategies with this one.  You can design subclasses of a new ''Player'' class is a little different.  Instead of "sit down," your ''decide'' method would call ''setActive(false)'' There are also two parmeters that delivers some information that you can use to make your own strategy.  A timid player would always sit down right away, while a greedy player will press his or her luck.  Luck at the ''decide'' of the different subclasses of ''Player''
 + 
  
 {{ https://mathorama.com/apcs/uploads/Main/GreedContest.png}} {{ https://mathorama.com/apcs/uploads/Main/GreedContest.png}}
greed_game.1544809993.txt.gz · Last modified: 2018/12/14 12:53 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki