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

  Breaking into the mobile device market

Hasn't Intel had a problem with breaking into the mobile device market? Why is that? What might we attribute as the cause of the problem?

  What is the main difference between iridium and globalstar

What is the main difference between Iridium and Globalstar?

  What is the largest number of frames in original frames

what is the largest number of frames in the original sequence you may have to decode?

  Shortest path between each pair of nodes using floyd''s metho

find the shortest path between each pair of nodes using Floyd's method

  Question regarding the project or ongoing operation

Briefly describe one or two of your current work assignments and determine whether they are projects or ongoing operations. Document your reasons for describing the assignment as a project or ongoing operation.

  Question regarding the public in a general cash offer

Mountaintop Market is offering 60,000 shares of stock to the public in a general cash offer. The offer price is $30 a share and the underwriter's spread is 9 percent.

  A software system composed of a crawler

A software system composed of a crawler and a query processor that helps users locate specific information on the Web or on a specific Web site

  What are the four approaches to installation

What are the four approaches to installation? Which is the most expensive? What is the most risky? How does an organization decide which approach to use?

  Find a function p giving the profit in terms of x

Find a function p giving the profit in terms of x.

  Identity using a combinatorial proof

Identity using a combinatorial proof

  Perform a full system scan every saturday at midnight

Perform a full system scan every Saturday at midnight. Check for updates before performing the scan.Apply default actions to items detected during a scan. Configure the following actions when items are found:

  Driving on a major highway

Were you ever puzzled by an odd looking tree while driving on a major highway? Perform a web search on "antennas camouflaged as trees" and explain in a few sentences what are they used for and why are they disguised.

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