Question: PLEASE IN C NOT JAVA OR C + + PLEASE ADD ALL THE REQUIRED FUNCTIONS LISTED Overview: The rand ( ) function is a random

PLEASE IN C NOT JAVA OR C++
PLEASE ADD ALL THE REQUIRED FUNCTIONS LISTED
Overview: The rand() function is a random number generator in C that returns a value in a specified range from [0, max]. The value returned by rand() function is based off a seed value that is passed into srand() function, which determines the pseudo-random
o numbers generated. Restrictions:
***You may not use any global variables.
Summary of DungeonCubeCaesar:
The game of DungeonCubeCaesar is a two-player game. A random five-letter word is generated and the number of sides for the two dices used in the game are determined. Players one and two each take turns to roll two n-side dices. Whichever player's sum of their dice roll is less than the other players, they gain a letter of the randomly generated word. They can also lose an accumulated character if they roll the highest value from both dices. The game repeats until one player accumulates five letters of the randomly generated word and declares as the loser. Afterwards, the losing player with all five letters of the randomly generated word encrypts the word resulting in the end of the game.
DungeonCubeCaesar Game Rules:
DungeonCubeCaesar is a two-player game where player one is a human player and player two is a non-human player whose name is Bob.
Upon the game beginning, a welcome message gets displayed.
Player one then gets asked to enter a seed value used for the game's duration.
o The seed input may only contain numerical characters.
o The seed entered must contain at least one numerical character and must be in the range of [1,9999].
o If at least one of these conditions is not satisfied, then the player must be prompted again to enter a valid seed until they do so.
o Once a valid seed is entered, this seed value is passed to the srand() function only once.
Next, a five-letter word to be used in the game is randomly generated.
o The randomly generated word must only contain lowercase alphabetical characters
. Next, player one is asked to enter their name to be used within the game.
o The name that the player enters must be at least two characters and no longer than 8 characters. The name must only contain alphabetical characters.
o If at least one of these conditions is not satisfied, then the player must be prompted again until their name satisfies the criteria specified.
Next, player one is asked to enter the number of sides for each of the two dices to be used in the game.
o A valid input for this prompt follows the format #x#, where the user will enter a single numerical character for the number of the sides for each of the two dices. The values entered must be in the range between [1,5].
If either of the sides of the dice specified are not within the valid range, then the user must be prompted again until they enter a valid input. o Valid sample inputs for the sides of the two dice are as follows: 3x3,5x5,2 x 4,2x 3
There may be any number of whitespaces in between the characters, which you need to handle accordingly when determining the sides of each of the dice
Afterwards, the game begins with player one rolling the two dices with the indicated sides followed by player two rolling the two dices.
o A player with the sum of their dice rolls less than the other player gains a character of the randomly generated word.
The sum of each players dice rolls must be kept track of. The losing players sum will be utilized in the ciphering at the end of the game.
o Any players with the sum of their dice rolls equal to the maximum dice roll possible will have the last accumulated character removed (assuming they have at least one character accumulated, otherwise nothing happens).
The game repeats until a loser accumulated the five letters from the randomly generated word.
On each round: o Display the current round starting from round 1
o Display the sum of dice rolls of player one and player two.
o Display the accumulated letters for each player at the end of each round
o Once a losing player is chosen, display which player lost and then subsequently display their encrypted word using a cipher.
The game ends afterwards.
Required functions(in addition to main):
int valid_seed(...);void generate_word(...);int roll_dice(...);int validate_sides(...);int validate_player_name(...);void cipher(...);
Sample output (highlighted text indicates user input):
Please enter a seed value to be used in the game: 123
The randomly generated word is: rlpal
Please enter your name: Joe12
Please enter a valid player name: Kled
Please enter the sides of two dice: 3x3
Round 1 starting now!
Kled is rolling the dice now!
Kled rolled a 4 Bob is rolling the dice now!
Bob rolled a 4
Kled's word is:
Bob's word is:
Round 2 starting now!
.......
........
Round 12 starting now!
Kled is rolling the dice now!
Kled rolled a 5
Bob is rolling the dice now!
Bob rolled a 6
Kled's word is: rlpal
Bob's word is: r
Kled has lost the game!
Their encrypted word is lfjuf

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!