Question: Help java code Help Java code 1. Player Class must have name, health(6) and score(0) 2. Game have commands pick, drop and use 1. pick

Help java codeHelp java code Help Java code 1. Player Class must have name,

Help Java code 1. Player Class must have name, health(6) and score(0) 2. Game have commands "pick", "drop" and "use" 1. "pick" can pick up items (pick up items will add to the player score based on the item's score. 2. "drop" - drop item (dropping items will deduct score based on the item's score. 3. "use" can use items (addition health score will be added based on the items condition) 3. Items must have attributes name and score 4. items can be stored in arraylist "potion" "coin" "fruits" 1. potion (15 score) - add 30 health 2. coin(5 score) - add 50 to score 3. fruits (10 score) - add 20 health 5. Different Rooms 1. forest 2. garden 3. office 4. river 5. Objective to clear the game: 1. health must be 100 2. go to garden (you win) Example output: Player in garden Items in garden: fruits coin >> pick fruits Player picked fruits Add 10 to score Total Score: 10 Health: 0 >> pick coin Player picked coin Add 5 to score Total Score: 15 Health: 0 >> use coin Player use coin Add 50 to score Total Score: 65 Health: 0

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!