Deal or No Deal


The 'Deal or No Deal' application was built as a bit of fun and based on the idea of the popular daytime show.

Object of the game:

Purely by guessing, remove each box. Leaving one with the largest amount of money and beating the 'Banker'.

To Play:

That's a basic overview of how it works.

The game has been packed into a .jar file. It can be downloaded by clicking here. The file size is 13Kb and is virus free.

 

 

Information

 

The code for this application is a bit long so if you want a copy of the java files, email me and I’ll send them to you. The basic structure of the class files is as follows.

 

 

DOND

 

Entry point for application

 
 


                                                             

 

 

 

DondUI

 

User Interface for application

 
 


                                                              

 

 

 

 


DondPaneContent

MenuBar

 

 

nPane

 

 

 

lPane

 

 

 

cPane

 

 

 

rPane

 

 

 

sPane

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 


game

 

 

MenuBar:

 

Contains 2 drop down menus

  1. File: contains ‘Start New Game’ and ‘Exit’
  2. Help: contains ‘Instructions’ and ‘About’

 

DondPaneContent

 

 

nPane: (north pane)

 

            Title Banner Graphic

 

 

lPane: (left pane)

 

            11 Jbuttons (numbered 1 - 11) with actionListeners

 

 

rPane: (right pane)

 

            11 Jbuttons (numbered 12 - 22) with actionListeners

 

 

sPane: (south pane)

 

            Contains interactive UI for such like the bankers phone. The box that the user initially selected at start of game.

 

 

cPane: (centre pane)

 

            2 colums of 11 JLabels displaying different monetary values

 

 

Monetary Values

 

1p

£1,000

10p

£3,000

50p

£5,000

£1

£10,000

£5

£15,000

£10

£20,000

£50

£35,000

£100

£50,000

£250

£75,000

£500

£100,000

£750

£250,000

 

 

game: (the runtime control of the game)

 

            This deals with any background calculations that need to be performed by the application, i.e. setting up the money values for the boxes when a new game is selected. What happens when a turn is taken and finally working out the dealers offer.

 

Incidentally the method that works out the dealers offer has been quite problematic.

 

 

 

On creation of new, an array of strings with the monetary values need to be randomly allocated to the JButtons 1-22.

 

Then the User needs to select a starting number to use as their own.

 

Also need a class that runs the control of button selection for the left and right panel.

            i.e. so once selected removes a label from the cPane display.