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

  Design process ensure a good design

Why does following the design process ensure a good design. Specifically what steps insure what goal of the design process?

  Strengths and weaknesses of carnival lines

1. What are the strengths and weaknesses of Carnival Lines? 2. What are the opportunities and threats facing Carnival Lines?

  Desperate need of an automated test scoring system

First ask for the number of questions in the testThen asks for the correct answers for each question. Note that multiple choice tests and questions will have answers from A to D. Ask for the number of students and process each student by asking for t..

  Give examples of 3 simple (scalar or primitive) data types

Give examples of 3 simple (scalar or primitive) data types commonly provided by programming languages, and identify the method used to represent each data type in the machine

  Determine the diameters of each exit duct in m

Twentytwo percent of the entering mass flow exits at 10 bar, 220°C, with a velocity of 20 m/s. The rest exits at another location with a pressure of 0.06 bar, a quality of 86.2%, and a velocity of 500 m/s. Determine the diameters of each exit duct..

  How do you control concurrency in the agile process

All modern programming languages implement the structured programming constructs, Provide examples from three programming languages that show structured programming constructs

  News article regarding denial of service attack

Research via the internet and find recent news article regarding denial of service attack, or distributed denial of service attack.Summarize the article using at least 500 words.The key to this assignment is to demonstrate your understanding of th..

  Terracotta is bigmemory maximum using server arrayconfigur

how terracotta is BigMemory Maximum using Server array Configratio

  Investigate and discuss how data is structured

Choose any two of the problem areas and discuss in detail how the database approach solves the problem when compared to alternative approaches.

  Step of the purchase decision

Consumer behavior Think of a product that you recently bought.  Mention, What, Where, How And When you BOUGHT it Describe what happened at every step of the purchase decision

  What is the probability q that a random ticket will be a win

What is the expected value of Wn, the prize you collect for your winning ticket?

  Show schematically a function definition line

Show schematically a function definition line ? And how u would call (execute) the function in a MATLAB program?

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