d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Python Coding
Add Reply New Topic New Poll
Member
Posts: 10,741
Joined: May 21 2006
Gold: 0.07
Feb 16 2023 08:43am
So i am currently doing a project where I have to create a text based game I am struggling on the loop for moving from room to room. Is there anyone out there that might be able to help me if I send the dictionary of rooms and direction?
Member
Posts: 8,428
Joined: May 30 2008
Gold: 882.50
Feb 16 2023 10:03am
Sure
Member
Posts: 25,301
Joined: Aug 9 2018
Gold: 250,413.00
Feb 17 2023 07:46pm
is great
Member
Posts: 17,598
Joined: Sep 27 2012
Gold: 9,000.00
Feb 18 2023 12:17am
Quote (DanTravBABY @ Feb 18 2023 02:46am)
^ehmmkay is great


Helped him a bit already :)
Trade Moderator
Posts: 21,408
Joined: Jul 26 2006
Gold: 7,919.00
Trader: Mediator
Feb 18 2023 04:54am
Feel free to send it over
Banned
Posts: 14
Joined: Jan 16 2023
Gold: 0.00
Mar 16 2023 02:20am
Hello this is Gulshan Negi
Well, to implement a loop for moving from room to room in a text-based game, you can follow some steps such as setting the starting room, asking the player for a direction to move, checking if the player can move in that direction, updating the current room if possible, and repeating until the game ends. Based on the dictionary of rooms and directions, you can use conditional statements and loops to implement these steps.
I think it is clear to you now.
Thanks
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll