please solve python code
Adventure Game In this application, you will develop a newer version of the adventure game that you have developed previously. Game features and rules are listed below: 1. |0.2pt.| The adventure land will have the size of 6 rows 7 columns, resulting in 42 cells. 2. {0.2pt.| inside these cells, the following values should be distributed randomly: 5 Treasures ('T), 5 Monster ('M'), 2 Sword ('S'), 3 Potion ['P'), and 3 Venom ('V'). 3. 10.3pt.| However, the adventure land should be initially displayed to user but with empty values, except that the initial starting point. The starting point should be randomly selected from an empty field (E). 4. (D.3pt. ) User should be able to move to Left, Right, Up or Down, by pressing respectively L or L, R or r, U or u, and D or d. Upon moving to a new cell, the content of the cell should be displayed. 5. [0.3pt. | After each move the adventure land should be updated with the new cell showing its content. The adventure land should not be duplicated on the screen to show the new location of the player. That means you should clear the console each time the user moves around. To do that, you can use 6. J 1pt.] With every move that does not kill the user, user earns 1 point. 7. |0.1pt | Each time the user finds a Treasure, the user earns 1 additional point. 8. [0.1pt.) Each time the player finds a Sword, it is added to his toollit. There is no limit on the number of potion that the player can collect. 9. 10.1ppt | Each time the player finds a Potion, it is added to his toolkit. There is no limit on the number of potion that the plaver can collect. 10. |p.1pt.| Encountering a Monster should kill the player if the user has NO Sword in the toolkit. 11. [0.2pts] Encountering a Monster should NOT kill the player if the user has a Sword in the toollit to use against the Monster. In this case, the sword count should be dropped by one. 12. (D. 1pt.) Encountering a Venom should kall the player if the user has NO Potion in the toolkit. 13. [0. .pts.] Encountering a Venom should NOT kil the player if the user has a Potion in the toolkit to recover from the Venom. In this case, the potion count should be dropped by one. 14. 10.2pta.] User should not be allowed to pass through a cell that is already visited befoce. 15. 10.2pts. ] At the bottom of the adventure map, the current score, and the number of swords and potions collected should be displayed and updated after each user move. 16. {0.3pts,1 The user moves and the total score per each game play session should be inserted to gamelog.json file. Further details are shared on the last page of this guide. Below are some screens from various game plays to illustrate the game rules and features. In the image above, user pressed I to move to the cell on the left (of the current cell), which contained ' V '. as seen below, Since the user does not have any Potion to use against Venom, the user dies. In another game play shown in the following two images below, the user moves down and finds a Sword. After finding the Sword, the Sword count it increased to 1 at the bottom row: Sword: [1] In several next moves, the user encounters a Potion, which increases the Potion count by 1 as displayed at the bottom row in the next screen. Next the user encounters a Monster and uses a Sword to save his/her life. As seen in the image below, the Sword count is decreased to 0 . Finding another potion, the potion count increases to 2 as shown in the image below. After finding a Treasure, the user gains an additional 1 point (besides the move). In the following screen, the user encounters a Venom and to recover from it, a Potion is used. Now the potion count is reduced to 1. In the following screen, the user encounters a Monster. Since no Sword is available in the toolkit, the user dies. After the game ends, the moves made by the user and the total score should be stored in the gamelog.json file. The key should be the start time of the game. A new log should be created after each game session. An example json file, which contains the logs of two game sessions, is shown below