![]() ![]() Configure the game (store these values to a variable of type GameInfo): Make sure the history of moves (all user entered positions during gameplay) is set to a safe empty state – you should assume there is potentially previous game data still stored that needs each element to be reset) 6.Prompt to set the number of lives a player is limited to for the game o The value must be between 1 and 10 inclusive o Note: you should design your code so that the maximum value rule can be easily modified in one place, so you do not need to make changes to the logic of the program o Validation should repeat as many times as necessary until a valid value is entered.Prompt to set the player’s character symbol (any printable character that will represent the player) o Note: Place a single space before the % specifier in the scanf to properly read this value scanf(" %c".Configure the player (store these values to a variable of type PlayerInfo): ![]() A series of 0’s and 1’s in an array that represents where treasure is buried along the path (hint: you should size this array based on a macro that represents the maximum path length that a game can be configured for – see example output to see what the maximum is) 5.A series of 0’s and 1’s in an array that represents where bombs are buried along the path (hint: you should size this array based on a macro that represents the maximum path length that a game can be configured for – see example output to see what the maximum is).The path length (number of positions) the game path will have for a game.The maximum number of “moves” a player can make for a game.You will need to create another user-defined data type called GameInfo which is used for configuring the game settings with members that can store the following related information: A history of all past entered positions entered by the player during the game (hint: you should size this array based on a macro that represents the maximum path length that a game can be configured for – see example output to see what the maximum is) 4. ![]() A counter to store the number of “treasure’s” found during the game.A character symbol that will be used to represent the player. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |