Question: Funky Board Game Design and implement a funky board game. ( Please see the intro video. ) Tokens will take turns to move on the

Funky Board Game
Design and implement a funky board game. (Please see the intro video.)
Tokens will take turns to move on the board. (logic provided in the demo code) When there is
only one token left on the board it wins the game.
Create a game board. The size of the board can be passed in as a parameter. (Similar to
TicTacToe Board in MP6)
Create a FunkyToken class:
Users can pass in the token symbol they want to use.
All token pieces should be able to move.
Create 2 sub classes: MoveOneToken and RandomToken.
MoveOneToken will move at a random direction, but will only move one space at a time.
If the token is going to move out of the board, it will try a different direction and move
again. If the spot already has a token, it will be replaced and removed from the board.
RandomToken will move to any random spot on the board. If the spot already has a
token, it will be replaced and removed from the board.
Use the provided FunkyGameDemo code to test run your program.
Copy and paste the output of your program to a txt file and submit it with your
source code just like the machine problems.
This should be a Java Code
package Funky_Game;
public class FunkyGameDemo {
public static void main(String[] args){
// TODO Auto-generated method stub
FunkyToken winner = null;
FunkyBoard board = new FunkyBoard(7);
FunkyToken[] tokens = new FunkyToken[3];
tokens[0]= new RandomToken('@');
tokens[1]= new MoveOneToken('$');
tokens[2]= new RandomToken('&');
board.placeToken(tokens[0],3,1);
board.placeToken(tokens[1],4,4);
board.placeToken(tokens[2],0,0);
board.displayBoard();
do {
for (int i =0; i tokens.length; i++){
if (tokens[i].active){
tokens[i].move(board);
System.out.println(tokens[i].token + "move");
board.displayBoard();
winner = board.getWinner();
if (winner != null)
break;
}
}
} while (winner == null);
System.out.println(winner.token +" won!");
}
}
 Funky Board Game Design and implement a funky board game. (Please

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 Databases Questions!