Implement a single threaded game engine

Assignment Help JAVA Programming
Reference no: EM13735596

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.

Reference no: EM13735596

Questions Cloud

Examine key concepts of leadership : For the final paper, you will examine key concepts of leadership in your place of work, or in a social organization to which you may belong that has leadership concepts (Rotary club, athletic team, scout leader, etc). Include the following in your..
Write a presentation explains progress in a community : Presentation illustrates and explains progress or lack of progress in a community since the movements of the 1960s. Photos are original, appropriate and illustrative of the community's change.
Develop a campaign outline : Choose one of the businesses/organizations that you have been following throughout the course that could benefit from a mobile marketing campaign. Develop a campaign outline
Different lateral structural arrangements : Write a paper that explains the number of different lateral structural arrangements in use in organizations, excluding project teams, matrix structures, organic systems, and professional organizations.
Implement a single threaded game engine : 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
Problem related to life skills : In "What Color Is Your Parachute?" (2007, now in its 36th printing, Ten Speed Press), Richard Bolles suggests that there are three life skills that schools should teach but don't: (1) How to find a job,
Describe three characteristics of quality data : Describe 3 characteristics of quality data that include the following: relevancy, granularity, consistency, accuracy, comprehensiveness, accessibility, timeliness, precision, and currency.
Problem related to role models : Let's discuss any conclusions that you reached on your research and writing about role models. What did you find that was important to you,
Strategic plan for any one of the corporation : To feel confident that all of the employees in your strategic planning team understand all that you have taught them, you require each to prepare a streamlined version of the key elements of a strategic plan. You require each employee to prepare t..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write a program to play a game of craps

Write a program to play a game of "craps," a dice game popular in casinos. Here are the rules - Use functions appropriately. The program should allow the user to play another round.

  A program that reads a four-digit number from the keyboard

Write a program that reads a four-digit number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. Hint: Break the string into characters and then convert each character to a va..

  Compare swing java gui components to awt components

Compare Swing Java GUI components to AWT components. Explain at least one way the components are similar and at least one way they are different.

  Write a java program that declares an array alpha of 50

Write a Java program that declares an array alpha of 50 elements of type double. Initialize the array so that the first 25 elements are equal to the square of the index variable, and the last 25 elements are equal to three times the index variable. O..

  Correct example of inheritance

Which of the following relationships is not a correct example of inheritance?  Parent to Children  Aunt to Uncle  Grandparent to Grandchild

  Prepare a program to triple each number in the list

Write a program that will read in a list of numbers, triple each number in the list and print the result - Write a program that will read in 2 numbers per line, and print the sum.

  Determines the number of stages on the rocket

Write a program that reads these data and determines the number of stages on the rocket. Use the data file rocket2.txt. It contains a trailer line with the value -99 for all four values.

  Write java program to compute how much federal need to pay

Write a java application to calculate how much federal and state tax you need to pay. The program should accomplish the following task.

  Java program to ask user to enter favorite color

Write a Java program to ask the user to enter favorite color, a favorite food, favorite animal, and first name of a friend or relative.

  How to setup a program to respond to events

Discussing how to setup a program to respond to events from any one of these sources - How do you create the necessary listener class? How do you associate the listener object with the event source?

  Your task for this project is to design a program to help a

your task for this project is to design a program to help a videorental store operatorrecord clients transactions. the

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd