Friday, July 27, 2012

Deal or No Deal (TI-84+)

Deal or No Deal?

This blog entry is about the famous game show Deal or No Deal?. The object is to win as much money as possible by either picking the grand prize or selling your box to the banker for more than what it's worth.

Deal or No Deal? has been broadcasted all over the world. Currently, there are several versions airing today. The Great Britain version is hosted by Noel Edmonds, while in Australia the host is Andrew O'Keefe. The UK version (which is presented in TI-84+ program today), offers a top prize of £250,000 (British pounds). The Australia version offers a top prize of 200,000 Australian dollars (not the same as US dollars). The Australia version also offers a car. In Egypt, the show is called Lebet El Hayat, hosted by Razan Maghrebi, where the top prize is 1,000,000 EGP (Egyptian pounds). Versions air in the Philippines, Panama, Spain, Chile, China, and India, just to name a few.

The version that aired in the United States, which aired from 2005 to 2009 (a syndicated version aired from 2008 to 2010), was hosted by Howie Mandel. The U.S. version offered a top prize of $1,000,000. The U.S. version did not last as long as it suffered from spoilers, overdrawn segments, and unnecessary fluff during games.

My favorite current version is the UK version. The game is well paced with the right amount of drama.

The program presented here uses the UK boards. A pence is a British penny, 100 pence is a British pound. Here is the board (22 boxes):


1p (0.01)
10p (0.10)
50p (0.50)
£1
£5
£10
£50
£100
£250
£500
£750


£1,000
£3,000
£5,000
£10,000
£15,000
£20,000
£35,000
£50,000
£75,000
£100,000
£250,000


UK DEAL OR NO DEAL
TI-84+


Program DEALGAME
: seq(X,X,1,22)→ L1
: randIntNoRep(1,22)→ L2
: {.01, .1, .5, 1, 5, 10, 50, 100, 250, 500, 750, 1000, 3000, 5000, 10000, 15000, 20000, 35000, 50000, 75000, 100000, 250000} → L3
: Disp "TOP PRIZE:", max(L3)
: Input "PICK YOUR BOX:", Y
: 0 → L1
: L3(L2(Y)) → Z
: {5,3,3,3,3,3}→ L4
: For(R, 1, 6)
: L4(R) → I
: For(K,I,1,-1)
: Disp "BOXES TO GO:", K
: Pause L1
: Input "CHOICE:", C
: 0→ L1(C)
: L3(L2(C))→ E
: Disp "AMOUNT:",E
: Pause
: D-1→ D
: 0→ L3(L2(C))
: End
: Disp "BOARD:"
: Pause L3
: Disp "TOP DOLLAR:", max(L3)
: Disp "BANKER'S OFFER..."
: round((rand/2+.5)*sum(L3)/D,0)→ O
: Disp O
: Pause
: Menu("DEAL OR NO DEAL?","YES",Y,"NO",N)
: Lbl N
: End
: Disp "2 BOXES LEFT"
: max(L1)→ U
: If Y=U
: Then
: min(L1)→ U
: End
: Menu("SWAP OR NO SWAP?","SWAP",S,"NO SWAP",W)
: Lbl S
: Disp "SWAPPING..."
: Y→ X
: U→ Y
: X→ U
: Lbl W
: Disp "YOUR BOX HAS:", L3(L2(Y))
: Pause
: Disp "THE OTHER:", L3(L2(U))
: Pause
: Disp "GAME OVER"
: Stop
: Lbl Y
: Disp "YOU TOOK:", O
: Disp "YOUR BOX:", L3(L2(Y))
: If O-L3(L2(Y)) ≥ 0
: Then
: Disp "GOOD DEAL"
: Else
: Disp "BAD DEAL"
: End

750 bytes


Note: the game does not detect whether you chose a box that has already previously has been chosen.

Instructions:

1. Select your box to keep. You will win this amount unless you sell it to the banker.

2. Select a set amount of boxes. The amounts revealed are what is not in your boxes. Ideally you want to eliminate as many low valued boxes as possible. Please look and scroll your list of available boxes. Box numbers that are out of play are replaced with zeroes.

3. At the end of each round, the game will give you a glance at the remaining amounts available in the name. Take the time to scroll them. Amounts no longer in play are replaced with zeroes.

4. The banker will make an offer. If believe the offer is good and you want it, take it. You can reject each deal.

5. If you reject each deal you will eventually be down to two boxes. Yours and the one remaining box not picked. The game will offer you a chance to swap boxes.
Regardless whether you deal or not, you will know the contents of your box.

Have fun!

Eddie

This blog is property of Edward Shore. © 2012



TI 84 Plus CE: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...