Question: Objective: To understand how to implement and use interfaces.Background: Despite being very different, two player games have some common tasks. For example, players should be

Objective: To understand how to implement and use interfaces.Background: Despite being very different, two player games have some common tasks. For example, players should be able to input moves that are determined to be valid or not based on the game. Once validated, the move should be able to be executed. Other common functionalities might be determining if a game is over, displaying the current state of the "board," and switch turns between players. All of these functions can exist withoutknowing the actual game. It would be up to the unique game classes to implement these behaviors, but a GamePlay application would be able to make these types of calls without knowing about the individual games.Tasks: Working with one partner, please complete the following tasks:1. Create an interface called Game and include the following methods:a. boolean is ValidMove(String move)b. void executeMove(String move)c. boolean isGameOver)d. void displayBoard)2. Implement these methods in the TicTacToe game and the Nim game (the base code for these classes has been provided for you).3. Write a GamePlayer class (a main) that plays a Game...the game play should be the same regardless of the type of game that it is. The only thing that should differ is creating a TicTacToe game or Nim game.What to submit:Game interface- Edited TicTacToe and Nim classes- GamePlayer class- One per group, please include both names in the submissionSearch

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!