Implement a single threaded game engine and single player


Assignment: Single Threaded Single Player Implementation

This assignment requires you to implement a single threaded game engine and single player user interface for a casino style dice game. The rules are simple, the player places a bet and then rolls two dice before the house rolls against the player. Highest number (sum of the two dice) wins! A draw is a no contest and the bet is returned to the player.

For this assignment you are provided with a number of interfaces that you must implement to provide the appropriate behaviour as well as a simple client which will help you test your game engine implementation independently of your GUI (to help you get started early). This will also ensure all functionality is separated from the GUI since your game code should operate independently using the console based client code.

NOTE: You may extend the provided console client code to facilitate testing but must ensure that the original unaltered code can still execute since we will use our own test client to check your code! i.e. do not change any of the interfaces etc.

AWT/Swing User Interface

You are to develop an AWT/Swing user interface that implements the following basic functionality:

Add one player

Place a bet (for the single player)

Player rolls dice (intermediate results of rolling dice are shown)

House rolls dice (intermediate results of rolling dice are shown)

Display results including updated player balance

For the user interface you can make the following assumptions.

It is up to you how to design the layout and appearance of your interface and you should focus on clarity and simplicity rather than elaborate design. However you should include at least one each of the following.

A pull down menu
A dialog box
A toolbar

A panel which represents the rolling dice (this can be as simple as a single label that is updated for each new pair of dice numbers received from the GameEngineCallback methods).

Marking emphasis will be on the quality of your code and your ability to implement the required functionality.

All of your GUI code (MVC view(s) and controllers(s)) should be separate from, and use, your GameEngineImpl implementation (MVC model) via the GameEngine interface.

For assignment 1 you need only provide a single player/single-threaded implementation of the game engine. In assignment 2 you will extend this code to add multi-threading, multiple player windows and networking capability to create a full concurrent and distributed multi player game.

Do not worry about modelling a real Casino "craps" game with its more complex rules. The focus here is on the implementation using a simple, highest dice sum wins.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Implement a single threaded game engine and single player
Reference No:- TGS0988807

Expected delivery within 24 Hours