Essential Question: How can I use nested if statements to create multiple outcomes for my video games?
Mastery Objectives:
Learn how to create an if statement.
Learn how to nest if statements.
Do Now: Write a Python program to construct the following pattern, using a nested for loop.
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
Directions: Create the familiar casino game called craps using if_then statements. Make sure you check the requirements and read all of the background information about the game. Your game should be unique and colorful. Use graphics to make it unique. Use the applet located in massone.mass.edu to see how the game works.
Vocabulary:
Shooter – player rolling the dice
Die – game piece that is shaped like a cube with six sides and numbers 1-6 on each side.
Dice – plural for die, more than one die
Come-out roll – first roll of a round of craps
Win – roll of a 7 or 11 in the come-out roll
Natural – roll of a 7 or 11 in the come-out roll
Snake Eyes – Roll of 2 (1 and 1)
Craps – roll of 2, 3, or 12 in the come-out roll
Point – roll of 4, 5, 6, 8, 9, or 10 in the come-out roll, shooter gets to roll again
Boxman – casino player who guards the chips
Base dealers – 2 casino players who take the bets
Stickman – casino player who stands across the boxman and announces the rolls, they also collect the dice for a new roll using a stick
Come-Out Roll (First Roll)
If come-out roll is 7, 11, 2, 3, or 12, round ends immediately and shooter must roll another come-out roll.
A roll of 7 or 11 is called a win or a natural.
A roll of 2, 3, or 12 is called craps.
A roll of anything other than 7, 11, 2, 3, or 12 is called the point. Shooter gets to roll again.
Re-roll (if shooter rolls a point)
Rolling continues until shooter rolls a 7 or the point.
If shooter rolls a 7, then roll ends and dice pass to the next player. This is called a 7-out.
If the shooter rolls the point again, the round ends and the game starts over with the same shooter rolling another come-out roll.