Design an interface game that describes a board game

Assignment Help Basic Computer Science
Reference no: EM131313597

Your task is to design a general program for managing board games with two players. Your program should be flexible enough to handle games such as tic-tac-toe, chess, or the Game of Nim of Project 6.2.

Design an interface Game that describes a board game. Think about what your program needs to do. It asks the first player to input a move-a string in a game-specific format, such as Be3 in chess. Your program knows nothing about specific games, so the Game interface must have a method such as

1537_equation.png

Once the move is found to be valid, it needs to be executed-the interface needs another method executeMove. Next, your program needs to check whether the game is over. If not, the other player's move is processed. You should also provide some mechanism for displaying the current state of the board.

Design the Game interface and provide two implementations of your choice-such as Nim and Chess (or TicTacToe if you are less ambitious). Your GamePlayer class should manage a Game reference without knowing which game is played, and process the moves from both players. Supply two programs that differ only in the initialization of the Game reference.

Reference no: EM131313597

Questions Cloud

Describe the reasons you have chosen each period piece : Describe the reasons you have chosen each period piece and why it appeals to you (how does the art piece express the time period? Description of each piece of art (name of art, year, subject).
What model velocity corresponds to a torpedo velocity : A 1/6-scale model of a torpedo is tested in a water tunnel to determine drag characteristics. What model velocity corresponds to a torpedo velocity of 20 knots?
Explain why the organization has or has not acted ethically : Explain why the organization has or has not acted ethically and explain what, if anything, the organization should have done differently.
Custom producer of industrial wire products : Wireway-located in Ft. Worth, Texas-is a custom producer of industrial wire products. The company has a lot of experience bending wire into many shapes and also can chrome- or gold-plate finished products.
Design an interface game that describes a board game : Your GamePlayer class should manage a Game reference without knowing which game is played, and process the moves from both players. Supply two programs that differ only in the initialization of the Game reference.
Research the sites for a celebrity golf tournament : As an event planner, you have been engaged to research the sites for a celebrity golf tournament. What is the best channel for conveying your findings to your boss or planning committee?
Create scenario illustrating how you in your role as manager : Develop a scenario illustrating how you, in your role as a manager, might use motivational concepts to create an environment where your employees are motivated and satisfied with their jobs.
Find the ratio of the model drag to the fullscale drag : The model is 3 m long. Find the air speed required to test the model and find the ratio of the model drag to the fullscale drag.
Write a paper about the millers story : Write a paper about the  Millers story .Explain in detail.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the role of linker in the compilation process

What is the role of linker in the compilation process?

  What is the impact of emi on fiber optic cables?

What is the impact of EMI on fiber optic cables?

  Reads in three integers

Write a program that reads in three integers and determines and prints the smallest number numerically in the group. The values are NOT necessarily entered in numeric order.

  Derive the expected mean squares

Derive the expected mean squares for a balanced three-stage nested design, assuming that A is fixed and that B and C are random. Obtain formulas for estimating the variance components. Assume the restricted form of the mixed model.

  Modify the previous program to get its input from a file

Write a program that accepts a sequence of average daily temps and computes the running total of cooling and heating degree-days. The program should print these two totals after all the data has been processed.

  Summarize the key points of the individual assignments

Identify regulatory compliance requirements for business managerial situations including those that relate to Sarbanes-Oxley Act of 2002 (SOX).

  Suggest a new scheduling algorithm

If you pick an algorithm that was already chosen (and posted) by another colleague, your post should be original (try covering different angles, give some examples, etc.). OR: Suggest a new scheduling algorithm. Show its advantages and disadvantage..

  Radically new applications of computers

The commentator assumed that computers would be used to solve a few scientific problems and little else. As the cost and size of computers has been reduced, the role of computers has increased. Is there a limit to the applications of computers? Do..

  Describe each in a couple of sentences

List the important tasks mentioned that are involved in analyzing Web content.

  Benefits of using wds over traditional imaging process

What are the benefits of using WDS over traditional imaging process? What are the requirements for implementing WDS?

  Create a new parameter query in design view

Create a new parameter query in Design view based on the Guides table with the following options: Add the FirstName, LastName, PhoneNumber, Address, State, and Postal Code fields (in that order) from the Guides table to the query.

  What is regression testing

What are some advantages and disadvantages of using centralized network management versus distributed network management?

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