Question
I have to design a board game! Help! This will be in Java. Code/Pseudo would be amazing to help me through. Hush, Hush Kleine Hexe
I have to design a board game! Help! This will be in Java. Code/Pseudo would be amazing to help me through.
Hush, Hush Kleine Hexe (or in English on your broom) is a Ravensburger memory board game for kids.
Here are the basic rules we will apply.
The number of players will be between 2 and 4. It wont change for the entire game.
There are 5 colors (red, orange, yellow, blue, green) token.
There are 5 indistinguishable black witch hats.
There is one dice which has a color on each face and then a shuffle.
There are 5 rows. At the beginning, all the tokens are at the bottom row. Any token crossing the 5th signals the end of the game (and a win).
Any player can move any token.
For each player, a turn is composed of three steps:
Rolling the die
If the die falls on a color, then the current player guesses which of the hats has the witch of the correct color under it. If the guess is correct, the player does another round. Otherwise, this ends their turn
If the die falls on shuffle, the player can exchange the positions of the 5 die/token combinations. This ends their turn.
For your final project you will design this board game.
The interface will be a simple grid like this where the leftmost column and the bottom row are the cell labels for this 6x6 grid. The letters are used as players' pieces, Blue, Red, Orange, bellow, and Green.
Your program will ask how many players are playing, then it will shuffle the token/hat pairs.
For each round, each player will have a turn.
For each turn,
The program will print the covered board
The player will play until their have either finished a shuffle or they have guessed the color wrong.
The program will roll the die using a random function.
The player will either guess or shuffle depending on the roll
A shuffle can have up to 5 switches.
If the die rolls on a color, the program will state which color rolled. Then it will ask the player for their guess, print the board with the token uncovered, and state whether the guess was correct or not. If the guess was correct, the token/hat is advanced up one row. If the guess was incorrect, the turn of that particular player is over.
Your program will be able to notice a win, will stop immediately and announce the win.
All inputs will be validated. You will use the best practices we have learned in class. Any infinite loops, breaks, continue, gotos will be dealt with harshly.
You will use
one or more arrays,
one or more loops,
one or more random generator functions,
You will have at least 3 functions which will have
parameters (at least one),
return values (at least one),
and will modify the array (at least one).
A function which only displays a message will not count. Your program will be able to handle 2 to 4 players seamlessly.
You may use classes and objects, but it is not an obligation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started