Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am sort of needing help in getting an algorithm planning for a game(text-only) that I am trying to code using the basics of C.
I am sort of needing help in getting an algorithm planning for a game(text-only) that I am trying to code using the basics of C. The screenshots are providing the details of the project. You would have to zoom in a lot to see the screenshot correctly. I just need help to construct a basic flow chart type algorithm that I can use as a reference for the real coding that I will do myself. Thank You!
Practice Project Attempt to create a project called- Text-Based Monopoly.-2 User/Player-Board Game- Users seek to gain wealth by purchasing or renting real estate Game Over-When P1 or P2 get bankrupt. The board The Users take turns similar to monopoly in moving around the board . It has 10 spaces (position 0 to position 9). TELEPHONE LIBEACH LAKE COMPANY COST-150 HOUSE HOUSE) 4 ( TAIL TIME MISS NEXT TURN TOWER ANON $. LA GO! TEXT Collect a od BASED a MONOPOLY FARMHOUSE $ RAILROAD JE r1@LOOK LOSTHOD CS Scanned with CamScanner ROLL 2 DICE Users have no real estate in the beginning. The Bank owns all of the properties on the board as in the case with the real monopoly game. Similar to the monopoly board game, they have infinite cash and are also owners of the properties that are available for purchase and are initially not renovated 2 users start from O position. ... They can use this to buy properties or pay rent during the game. Initially, both players are at Go (position 0). Possible Positions- Go (position 0) Jail Time (position 4), ? (position 6), house properties at positions (1, 3, 5, 8, 9,) ( Telephone company at position 2), Railroad (position 7) Basic Rules Upon Player lands on a property. Users can purchase the specific asset from the bank ... User has to pay the specific cost of the asset to the bank. If the user lands on an asset that is possessed by the corresponding user, the user has to pay the corresponding user who possesses the respective asset the rent. If the user asset is a house property that is possessed by the same user, the user can do nothing or renovate.(Price-50) If the user lands on the property that is either not a house property or is a house property that the user has already renovated, the user does nothing. User lands on Jail Time - The player loses his next turn. (Normal Monopoly Rules) User lands on or passes by Go.- The player gets 200 from the Bank (Normal Monopoly Rules) User lands on ? - The player rolls a dice to determine his luck. When one user goes bankrupt, the game ends and the user is declared the winner Buying properties When a player lands on a Bank-owned property, he or she has the option to purchase it from the Bank by paying the property cost. The player must have enough cash on hand to cover the cost of the property; else, he will be unable to purchase it. If user lands on Telephone Company (Price-150) If user lands on Railroad (Price-100). House Properties (1,3,5,8.9) Cost is computed (not stored) by multiplying 20 to the remainder the position of the property when divided by 7 E.g. Tree House at position 1 costs 20. Farmhouse at position 9 costs 40 Paving rent When a player lands on another player's property, he must pay the owner rent for that property. Landing on the Telephone Company will cost you 8 times the value of the die you rolled. Eg:, P1 is at the Farm House right now (position 9). The value of the dice rolled by Player 1 is 3. Player 1 advances three places and arrives on Player 2's Telephone Company (position 2). Player 1 pays Player 2 the rent for landing on the Telephone Company, which is 24 (8 *3 = 24). Railroad (Price - 35) House Properties (1,3,5,8,9) The rent of the house properties is computed based on its cost. The rent of an unrenovated property is one-fifth of its cost. The rent of a renovated property is one plus twice the rent (unrenovated). E.g. The cost of the Beach House (position 3) is 60. The rent is 12. If it has been renovated, its rent is 25. Insufficient cash! When a user doesn't even have sufficient cash on hand to pay rent, user can sell all of it's properties back to the Bank the user recoupes sufficient cash to pay for the rent The player chooses a home to sale to the Bank (one property at a time). The property's resale value is half of its original cost. When all of a player's assets are sold to the bank and his cash is insufficient to pay the rent, the player is declared bankrupt, and the game is over. ? When a player lands on ? (position 6), the player rolls the dice to determine his luck. His luck is determined by the dice value. Dice Value Il Dice Value is prime -> User collects money from Bank D00, 200] Ip Dice value is not prime User pays money tobana C50, 100] I Dice value is 1 users has to be in jail (Skips next turn) Extra Notes 1. When it comes to renovated buildings, cost and rent must all be calculated. They can't be stored in seperate variables or arrays. 2.Arrays or 7 separate variables can't be used to keep record of the possession of the properties. They have to computed as the the 9-digit integer. Ex- 9-Digit-Integer 000XOX000 Each digit corresponds to one property on the board . The first digit from the right is the status of the Lake House (Prop 1) . The second digit from the right is for Telephone Company (Prop2), the third digit from the right is for Beach House (Prop3), and so on.. The leftmost digit (9th digit from right) is the status of the FarmHouse(Prop9) The digits on each property are updated when a player buys, renovates, or resells a property Owns the property Renovates the property User 1 User 2 Not Applicable The 4th and 6th digit from the right can be any digit since these are Jail Time and that are not owned by any of the respective users. 3. It is a menu-driven prgrm. Yes or No Question should be avoided as much as possible. User can start a new game by clicking the respective position or the user can quit it by choosing the respective exit option. L 1 3 2 4 Bank 0 Practice Project Attempt to create a project called- Text-Based Monopoly.-2 User/Player-Board Game- Users seek to gain wealth by purchasing or renting real estate Game Over-When P1 or P2 get bankrupt. The board The Users take turns similar to monopoly in moving around the board . It has 10 spaces (position 0 to position 9). TELEPHONE LIBEACH LAKE COMPANY COST-150 HOUSE HOUSE) 4 ( TAIL TIME MISS NEXT TURN TOWER ANON $. LA GO! TEXT Collect a od BASED a MONOPOLY FARMHOUSE $ RAILROAD JE r1@LOOK LOSTHOD CS Scanned with CamScanner ROLL 2 DICE Users have no real estate in the beginning. The Bank owns all of the properties on the board as in the case with the real monopoly game. Similar to the monopoly board game, they have infinite cash and are also owners of the properties that are available for purchase and are initially not renovated 2 users start from O position. ... They can use this to buy properties or pay rent during the game. Initially, both players are at Go (position 0). Possible Positions- Go (position 0) Jail Time (position 4), ? (position 6), house properties at positions (1, 3, 5, 8, 9,) ( Telephone company at position 2), Railroad (position 7) Basic Rules Upon Player lands on a property. Users can purchase the specific asset from the bank ... User has to pay the specific cost of the asset to the bank. If the user lands on an asset that is possessed by the corresponding user, the user has to pay the corresponding user who possesses the respective asset the rent. If the user asset is a house property that is possessed by the same user, the user can do nothing or renovate.(Price-50) If the user lands on the property that is either not a house property or is a house property that the user has already renovated, the user does nothing. User lands on Jail Time - The player loses his next turn. (Normal Monopoly Rules) User lands on or passes by Go.- The player gets 200 from the Bank (Normal Monopoly Rules) User lands on ? - The player rolls a dice to determine his luck. When one user goes bankrupt, the game ends and the user is declared the winner Buying properties When a player lands on a Bank-owned property, he or she has the option to purchase it from the Bank by paying the property cost. The player must have enough cash on hand to cover the cost of the property; else, he will be unable to purchase it. If user lands on Telephone Company (Price-150) If user lands on Railroad (Price-100). House Properties (1,3,5,8.9) Cost is computed (not stored) by multiplying 20 to the remainder the position of the property when divided by 7 E.g. Tree House at position 1 costs 20. Farmhouse at position 9 costs 40 Paving rent When a player lands on another player's property, he must pay the owner rent for that property. Landing on the Telephone Company will cost you 8 times the value of the die you rolled. Eg:, P1 is at the Farm House right now (position 9). The value of the dice rolled by Player 1 is 3. Player 1 advances three places and arrives on Player 2's Telephone Company (position 2). Player 1 pays Player 2 the rent for landing on the Telephone Company, which is 24 (8 *3 = 24). Railroad (Price - 35) House Properties (1,3,5,8,9) The rent of the house properties is computed based on its cost. The rent of an unrenovated property is one-fifth of its cost. The rent of a renovated property is one plus twice the rent (unrenovated). E.g. The cost of the Beach House (position 3) is 60. The rent is 12. If it has been renovated, its rent is 25. Insufficient cash! When a user doesn't even have sufficient cash on hand to pay rent, user can sell all of it's properties back to the Bank the user recoupes sufficient cash to pay for the rent The player chooses a home to sale to the Bank (one property at a time). The property's resale value is half of its original cost. When all of a player's assets are sold to the bank and his cash is insufficient to pay the rent, the player is declared bankrupt, and the game is over. ? When a player lands on ? (position 6), the player rolls the dice to determine his luck. His luck is determined by the dice value. Dice Value Il Dice Value is prime -> User collects money from Bank D00, 200] Ip Dice value is not prime User pays money tobana C50, 100] I Dice value is 1 users has to be in jail (Skips next turn) Extra Notes 1. When it comes to renovated buildings, cost and rent must all be calculated. They can't be stored in seperate variables or arrays. 2.Arrays or 7 separate variables can't be used to keep record of the possession of the properties. They have to computed as the the 9-digit integer. Ex- 9-Digit-Integer 000XOX000 Each digit corresponds to one property on the board . The first digit from the right is the status of the Lake House (Prop 1) . The second digit from the right is for Telephone Company (Prop2), the third digit from the right is for Beach House (Prop3), and so on.. The leftmost digit (9th digit from right) is the status of the FarmHouse(Prop9) The digits on each property are updated when a player buys, renovates, or resells a property Owns the property Renovates the property User 1 User 2 Not Applicable The 4th and 6th digit from the right can be any digit since these are Jail Time and that are not owned by any of the respective users. 3. It is a menu-driven prgrm. Yes or No Question should be avoided as much as possible. User can start a new game by clicking the respective position or the user can quit it by choosing the respective exit option. L 1 3 2 4 Bank 0
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