Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.85 KB

explorer_guide.md

File metadata and controls

59 lines (45 loc) · 1.85 KB

Explorer guide

either run from command line with

python explore.py

or load up python from command line and import * from utils

basic_utils.py is just all the old graphs, stack, queue and search funtions from our assignments

to initialize from python

mappy = mapper()
mappy.create_starting_map()

set your custom variables

mappy.accumulate = True       # auto pick up items
mappy.save_map_to_text = True #overwrite current map.txt with fresh map.txt
mappy.import_text_map = True #load current map.txt as starting map #MUST BE DONE BEFORE create_starting_map
                             #if you don't want fresh map

show your latest map

mappy.my_map.vertices

randomly explore

mappy.explore_random(50)   #exploring 50 unkown rooms (not including backtracking)

take action in current room given lastest info from server

mappy.room_check()   #given how you have set certain variables like pray or accumulate will automate actions 
                    # given certain cues from the server json responses

examples of working commands

mappy.get_info('init')                  # initialize and get current room details
mappy.get_info('move','n')              # move north
mappy.get_info('backtrack','e','254')   # back track specifying room and direction

mappy.action('take','tiny treasure')    # pick up some treasure  
mappy.action('drop','tiny treasure')    # drop some treasure in your inventory
mappy.action('sell','tiny treasure')    # sell some treasure in your inventory
mappy.action('sell_confirm','tiny treasure')    # confirm sell some treasure in your inventory 
mappy.action('examine','tiny treasure')    # examine tiny treasure in your inventory
mappy.action('status')                  # get status update
mappy.action('pray')                    # pray in shrine room