diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..28fdd4b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +move_sell_pray/__pycache__/ \ No newline at end of file diff --git a/500rooms.pickle b/500rooms.pickle new file mode 100644 index 00000000..efa6fd33 Binary files /dev/null and b/500rooms.pickle differ diff --git a/500rooms.txt b/500rooms.txt new file mode 100644 index 00000000..7b87f069 --- /dev/null +++ b/500rooms.txt @@ -0,0 +1 @@ +{"373": {"room_id": 373, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["n", "s"], "cooldown": 1.0, "errors": [], "messages": []}, "307": {"room_id": 307, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "371": {"room_id": 371, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "475": {"room_id": 475, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "484": {"room_id": 484, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "321": {"room_id": 321, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "413": {"room_id": 413, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "230": {"room_id": 230, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "199": {"room_id": 199, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "198": {"room_id": 198, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "166": {"room_id": 166, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(62,52)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked north.", "Uphill Penalty: 5s CD"]}, "117": {"room_id": 117, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,52)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked west.", "Uphill Penalty: 5s CD"]}, "133": {"room_id": 133, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(60,52)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": ["small treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "173": {"room_id": 173, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "214": {"room_id": 214, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,52)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20668"], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "226": {"room_id": 226, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "300": {"room_id": 300, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "377": {"room_id": 377, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "389": {"room_id": 389, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "194": {"room_id": 194, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["shiny treasure"], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "129": {"room_id": 129, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "170": {"room_id": 170, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "126": {"room_id": 126, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "98": {"room_id": 98, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(57,55)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked north.", "Uphill Penalty: 5s CD"]}, "102": {"room_id": 102, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "142": {"room_id": 142, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "159": {"room_id": 159, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "196": {"room_id": 196, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "222": {"room_id": 222, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "305": {"room_id": 305, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "365": {"room_id": 365, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "197": {"room_id": 197, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "276": {"room_id": 276, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "419": {"room_id": 419, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "232": {"room_id": 232, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "235": {"room_id": 235, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "355": {"room_id": 355, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "330": {"room_id": 330, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "383": {"room_id": 383, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "495": {"room_id": 495, "title": "The Transmogriphier", "description": "A strange machine stands in this room. There is a large opening on the top. A placard reads, \"Test your luck! One item and one Lambdacoin!\"", "coordinates": "(50,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "369": {"room_id": 369, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "400": {"room_id": 400, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "376": {"room_id": 376, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure", "tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "272": {"room_id": 272, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "295": {"room_id": 295, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "109": {"room_id": 109, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "185": {"room_id": 185, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "175": {"room_id": 175, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "179": {"room_id": 179, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "213": {"room_id": 213, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "420": {"room_id": 420, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "444": {"room_id": 444, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "490": {"room_id": 490, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "493": {"room_id": 493, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(50,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "437": {"room_id": 437, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "497": {"room_id": 497, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(50,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "233": {"room_id": 233, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "238": {"room_id": 238, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "183": {"room_id": 183, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "229": {"room_id": 229, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "250": {"room_id": 250, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "289": {"room_id": 289, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "294": {"room_id": 294, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "334": {"room_id": 334, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "393": {"room_id": 393, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "482": {"room_id": 482, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "341": {"room_id": 341, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "449": {"room_id": 449, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "391": {"room_id": 391, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "428": {"room_id": 428, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "396": {"room_id": 396, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "236": {"room_id": 236, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "264": {"room_id": 264, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "274": {"room_id": 274, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure", "small treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "308": {"room_id": 308, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "273": {"room_id": 273, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "343": {"room_id": 343, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "351": {"room_id": 351, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "478": {"room_id": 478, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "491": {"room_id": 491, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "70": {"room_id": 70, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(58,55)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": ["shiny treasure"], "exits": ["s", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked east.", "Uphill Penalty: 5s CD"]}, "60": {"room_id": 60, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(59,55)", "elevation": 3, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked east.", "Uphill Penalty: 5s CD"]}, "36": {"room_id": 36, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(60,55)", "elevation": 4, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked east.", "Uphill Penalty: 5s CD"]}, "22": {"room_id": 22, "title": "The Peak of Mt. Holloway", "description": "You are standing at the zenith of Mt. Holloway. You see before you a holy shrine erected in the image of a magnificent winged deity.", "coordinates": "(61,55)", "elevation": 5, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked east.", "Uphill Penalty: 5s CD"]}, "18": {"room_id": 18, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,56)", "elevation": 4, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "12": {"room_id": 12, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,57)", "elevation": 3, "terrain": "MOUNTAIN", "players": [], "items": ["small treasure"], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "9": {"room_id": 9, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,58)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": ["small treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "11": {"room_id": 11, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(62,58)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "17": {"room_id": 17, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "24": {"room_id": 24, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "42": {"room_id": 42, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "80": {"room_id": 80, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "81": {"room_id": 81, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "86": {"room_id": 86, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "90": {"room_id": 90, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "178": {"room_id": 178, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "209": {"room_id": 209, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "243": {"room_id": 243, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,57)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20658"], "items": ["tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "293": {"room_id": 293, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "256": {"room_id": 256, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "327": {"room_id": 327, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "427": {"room_id": 427, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "430": {"room_id": 430, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "443": {"room_id": 443, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "471": {"room_id": 471, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "439": {"room_id": 439, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "360": {"room_id": 360, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "398": {"room_id": 398, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "438": {"room_id": 438, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "465": {"room_id": 465, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "498": {"room_id": 498, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "96": {"room_id": 96, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "97": {"room_id": 97, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "181": {"room_id": 181, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "118": {"room_id": 118, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "137": {"room_id": 137, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "44": {"room_id": 44, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "3": {"room_id": 3, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(61,59)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "2": {"room_id": 2, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,59)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20671"], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "0": {"room_id": 0, "title": "A brightly lit room", "description": "You are standing in the center of a brightly lit room. You notice a shop to the west and exits to the north, south and east.", "coordinates": "(60,60)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20729", "User 20700", "User 20652", "User 20718", "User 20675", "User 20680", "User 20674", "User 20719", "User 20673", "User 20645", "User 20716", "User 20701", "User 20732", "User 20727", "User 20725", "User 20723", "User 20722", "User 20717", "User 20711", "User 20710", "User 20708", "User 20707", "User 20706", "User 20705", "User 20704", "User 20703", "User 20702", "User 20697", "User 20694", "User 20692", "User 20691", "User 20688", "User 20687", "User 20686", "User 20682", "User 20672", "User 20669", "User 20666", "User 20665", "User 20664", "User 20663", "User 20662", "User 20657", "User 20655", "User 20654", "User 20650", "User 20646", "User 20642"], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "1": {"room_id": 1, "title": "Shop", "description": "You are standing in a small shop. A sign behind the mechanical shopkeeper says 'WILL PAY FOR TREASURE'.", "coordinates": "(59,60)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20638", "User 20689", "User 20639", "User 20647"], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "10": {"room_id": 10, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,61)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20720", "User 20721", "User 20679", "User 20676"], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "19": {"room_id": 19, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "77": {"room_id": 77, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,62)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20728"], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "20": {"room_id": 20, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,63)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20699", "User 20643", "User 20715"], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "46": {"room_id": 46, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "62": {"room_id": 62, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "64": {"room_id": 64, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "82": {"room_id": 82, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "191": {"room_id": 191, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "84": {"room_id": 84, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "91": {"room_id": 91, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "99": {"room_id": 99, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "146": {"room_id": 146, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "257": {"room_id": 257, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "364": {"room_id": 364, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "448": {"room_id": 448, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "429": {"room_id": 429, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "381": {"room_id": 381, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "394": {"room_id": 394, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "320": {"room_id": 320, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "348": {"room_id": 348, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "215": {"room_id": 215, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "246": {"room_id": 246, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "177": {"room_id": 177, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "346": {"room_id": 346, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "190": {"room_id": 190, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "101": {"room_id": 101, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "113": {"room_id": 113, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "114": {"room_id": 114, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "176": {"room_id": 176, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "402": {"room_id": 402, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "451": {"room_id": 451, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(52,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "453": {"room_id": 453, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "464": {"room_id": 464, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(51,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "180": {"room_id": 180, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "63": {"room_id": 63, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,64)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20726"], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "72": {"room_id": 72, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,65)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20724"], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "76": {"room_id": 76, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,65)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20648"], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "110": {"room_id": 110, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,65)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20644"], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "83": {"room_id": 83, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "130": {"room_id": 130, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "125": {"room_id": 125, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "165": {"room_id": 165, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "204": {"room_id": 204, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "219": {"room_id": 219, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "216": {"room_id": 216, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(56,67)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "234": {"room_id": 234, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(56,68)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "252": {"room_id": 252, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,68)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "284": {"room_id": 284, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "302": {"room_id": 302, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,70)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 45.0, "errors": [], "messages": ["You have walked north.", "It's a trap!: +30s CD"]}, "422": {"room_id": 422, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,71)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 45.0, "errors": [], "messages": ["You have walked north.", "It's a trap!: +30s CD"]}, "426": {"room_id": 426, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,72)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 45.0, "errors": [], "messages": ["You have walked north.", "It's a trap!: +30s CD"]}, "457": {"room_id": 457, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,73)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 45.0, "errors": [], "messages": ["You have walked north.", "It's a trap!: +30s CD"]}, "461": {"room_id": 461, "title": "Linh's Shrine", "description": "You are standing before a glowing shrine to a Linh, the Swift. She looks quite fast.", "coordinates": "(55,74)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "303": {"room_id": 303, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "405": {"room_id": 405, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "406": {"room_id": 406, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,70)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "415": {"room_id": 415, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,70)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 45.0, "errors": [], "messages": ["You have walked west.", "It's a trap!: +30s CD"]}, "418": {"room_id": 418, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(51,70)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "474": {"room_id": 474, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(51,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "425": {"room_id": 425, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(51,71)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "469": {"room_id": 469, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(50,71)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "361": {"room_id": 361, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,70)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 45.0, "errors": [], "messages": ["You have walked north.", "It's a trap!: +30s CD"]}, "408": {"room_id": 408, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,71)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "458": {"room_id": 458, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,72)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "459": {"room_id": 459, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,72)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "423": {"room_id": 423, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,71)", "elevation": 0, "terrain": "CAVE", "players": [], "items": ["small treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "454": {"room_id": 454, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,71)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "470": {"room_id": 470, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,72)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "368": {"room_id": 368, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(56,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "218": {"room_id": 218, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,67)", "elevation": 0, "terrain": "CAVE", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "263": {"room_id": 263, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(55,66)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "242": {"room_id": 242, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,67)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 45.0, "errors": [], "messages": ["You have walked west.", "It's a trap!: +30s CD"]}, "275": {"room_id": 275, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You notice a cave entrance to the east and cliffside landmark to the west.", "coordinates": "(53,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "456": {"room_id": 456, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You notice a cave entrance to the east and cliffside landmark to the west.", "coordinates": "(52,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "499": {"room_id": 499, "title": "Glasowyn's Grave", "description": "You see a moss-topped gravestone which reads: 'Here lies Glasowyn of Web17/Labs12/CS18, who was crushed under the weight of her own gold.' There doesn't seem to be any gold around, but marks in the dirt suggest that someone has knelt there, perhaps in prayer.", "coordinates": "(51,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "287": {"room_id": 287, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,68)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "339": {"room_id": 339, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,68)", "elevation": 0, "terrain": "TRAP", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 45.0, "errors": [], "messages": ["You have walked west.", "It's a trap!: +30s CD"]}, "445": {"room_id": 445, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,68)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "450": {"room_id": 450, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(51,68)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "447": {"room_id": 447, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,69)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "259": {"room_id": 259, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(54,66)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "310": {"room_id": 310, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(53,66)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "412": {"room_id": 412, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,66)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "488": {"room_id": 488, "title": "A Dark Cave", "description": "You are standing in a dark cave.", "coordinates": "(52,65)", "elevation": 0, "terrain": "CAVE", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "203": {"room_id": 203, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,68)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20693"], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "299": {"room_id": 299, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "311": {"room_id": 311, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "268": {"room_id": 268, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "411": {"room_id": 411, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "312": {"room_id": 312, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "328": {"room_id": 328, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "363": {"room_id": 363, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "372": {"room_id": 372, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,71)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20734"], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "441": {"room_id": 441, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "332": {"room_id": 332, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "350": {"room_id": 350, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "436": {"room_id": 436, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "404": {"room_id": 404, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "481": {"room_id": 481, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "357": {"room_id": 357, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "237": {"room_id": 237, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "245": {"room_id": 245, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "254": {"room_id": 254, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,65)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20670"], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "314": {"room_id": 314, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "73": {"room_id": 73, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "27": {"room_id": 27, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "30": {"room_id": 30, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "32": {"room_id": 32, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "39": {"room_id": 39, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "51": {"room_id": 51, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "57": {"room_id": 57, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "145": {"room_id": 145, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "220": {"room_id": 220, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "174": {"room_id": 174, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "192": {"room_id": 192, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "201": {"room_id": 201, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "223": {"room_id": 223, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "283": {"room_id": 283, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "331": {"room_id": 331, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "446": {"room_id": 446, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "466": {"room_id": 466, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "472": {"room_id": 472, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "486": {"room_id": 486, "title": "Arron's Athenaeum", "description": "Before you lies a radiant book of knowledge, on a pedestal inlaid with Lambda Coins. Below, a plaque reads: Herin exists knowledge gathered by Arron of Web19/CS21. Always seek to learn. Ask questions. Don't panic, bring a towel.", "coordinates": "(69,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "313": {"room_id": 313, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "224": {"room_id": 224, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "69": {"room_id": 69, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "103": {"room_id": 103, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "160": {"room_id": 160, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "94": {"room_id": 94, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "152": {"room_id": 152, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "41": {"room_id": 41, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "53": {"room_id": 53, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "88": {"room_id": 88, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "122": {"room_id": 122, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,65)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "124": {"room_id": 124, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "157": {"room_id": 157, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "210": {"room_id": 210, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "182": {"room_id": 182, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "208": {"room_id": 208, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "95": {"room_id": 95, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "119": {"room_id": 119, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "134": {"room_id": 134, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "144": {"room_id": 144, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "155": {"room_id": 155, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "187": {"room_id": 187, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "316": {"room_id": 316, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "344": {"room_id": 344, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,69)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20677"], "items": ["tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "390": {"room_id": 390, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "392": {"room_id": 392, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "462": {"room_id": 462, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "147": {"room_id": 147, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "153": {"room_id": 153, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "329": {"room_id": 329, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "200": {"room_id": 200, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "227": {"room_id": 227, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "269": {"room_id": 269, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "319": {"room_id": 319, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "359": {"room_id": 359, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,74)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "345": {"room_id": 345, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "375": {"room_id": 375, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "385": {"room_id": 385, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "206": {"room_id": 206, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "380": {"room_id": 380, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "424": {"room_id": 424, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "473": {"room_id": 473, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "494": {"room_id": 494, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "288": {"room_id": 288, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "151": {"room_id": 151, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "172": {"room_id": 172, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "267": {"room_id": 267, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "271": {"room_id": 271, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure", "small treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "337": {"room_id": 337, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "285": {"room_id": 285, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "286": {"room_id": 286, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "291": {"room_id": 291, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "410": {"room_id": 410, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,74)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "347": {"room_id": 347, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,73)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "452": {"room_id": 452, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,74)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "442": {"room_id": 442, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "336": {"room_id": 336, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,74)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "207": {"room_id": 207, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "290": {"room_id": 290, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,69)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "231": {"room_id": 231, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "248": {"room_id": 248, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "280": {"room_id": 280, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,70)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "325": {"room_id": 325, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "353": {"room_id": 353, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,72)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "374": {"room_id": 374, "title": "Fully Shrine", "description": "Here lies a shrine for Full-lifey, who captured the golden snitch and gained the power to warp between worlds with some help from his team and a solitary spy.", "coordinates": "(58,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "296": {"room_id": 296, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,71)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "115": {"room_id": 115, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,66)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "116": {"room_id": 116, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,67)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "132": {"room_id": 132, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,68)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "54": {"room_id": 54, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "31": {"room_id": 31, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "33": {"room_id": 33, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "38": {"room_id": 38, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "66": {"room_id": 66, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "123": {"room_id": 123, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "169": {"room_id": 169, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "186": {"room_id": 186, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "205": {"room_id": 205, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "479": {"room_id": 479, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,63)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "241": {"room_id": 241, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "338": {"room_id": 338, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["s", "w"], "cooldown": 1.0, "errors": [], "messages": []}, "270": {"room_id": 270, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "265": {"room_id": 265, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,61)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20649"], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "279": {"room_id": 279, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "249": {"room_id": 249, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "282": {"room_id": 282, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "240": {"room_id": 240, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "386": {"room_id": 386, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "414": {"room_id": 414, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "221": {"room_id": 221, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "253": {"room_id": 253, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "258": {"room_id": 258, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "306": {"room_id": 306, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "397": {"room_id": 397, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "184": {"room_id": 184, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "127": {"room_id": 127, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "120": {"room_id": 120, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "107": {"room_id": 107, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "104": {"room_id": 104, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "59": {"room_id": 59, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "92": {"room_id": 92, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "121": {"room_id": 121, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "143": {"room_id": 143, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "212": {"room_id": 212, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "128": {"room_id": 128, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "189": {"room_id": 189, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "255": {"room_id": 255, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "28": {"room_id": 28, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "40": {"room_id": 40, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,64)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "43": {"room_id": 43, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,61)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20641"], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "47": {"room_id": 47, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "71": {"room_id": 71, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "4": {"room_id": 4, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "13": {"room_id": 13, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "15": {"room_id": 15, "title": "JKMT Donuts", "description": "A glass display case separates you from fried, yummy goodness. Behind the stacks of pink boxes, you hear a worker yelling. A sign reads, 'Donuts for sale!'", "coordinates": "(63,60)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20690", "User 20656"], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east.", "Grumpy Tommy welcomes you to the shop and says, \"What do you want? I have a raid in 15 minutes.\""]}, "23": {"room_id": 23, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,61)", "elevation": 0, "terrain": "NORMAL", "players": ["mrpizza"], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "26": {"room_id": 26, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "55": {"room_id": 55, "title": "Wishing Well", "description": "You are standing besides a large well. A sign next the well reads 'EXAMINE WELL, FIND WEALTH'.", "coordinates": "(63,61)", "elevation": 0, "terrain": "NORMAL", "players": ["[Krishan the Quail]"], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "6": {"room_id": 6, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "7": {"room_id": 7, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "56": {"room_id": 56, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "61": {"room_id": 61, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "171": {"room_id": 171, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "8": {"room_id": 8, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "16": {"room_id": 16, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "58": {"room_id": 58, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,60)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20733"], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "65": {"room_id": 65, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "139": {"room_id": 139, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "188": {"room_id": 188, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "335": {"room_id": 335, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(54,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "366": {"room_id": 366, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(53,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "74": {"room_id": 74, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "87": {"room_id": 87, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,62)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20731"], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "161": {"room_id": 161, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "67": {"room_id": 67, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "162": {"room_id": 162, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "5": {"room_id": 5, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "14": {"room_id": 14, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(62,57)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "34": {"room_id": 34, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(62,56)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "35": {"room_id": 35, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "52": {"room_id": 52, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "75": {"room_id": 75, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "85": {"room_id": 85, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "154": {"room_id": 154, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "193": {"room_id": 193, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "251": {"room_id": 251, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "315": {"room_id": 315, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,55)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20667"], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "68": {"room_id": 68, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "100": {"room_id": 100, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,54)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20653"], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "106": {"room_id": 106, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "111": {"room_id": 111, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "367": {"room_id": 367, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "158": {"room_id": 158, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "167": {"room_id": 167, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "260": {"room_id": 260, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "262": {"room_id": 262, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "370": {"room_id": 370, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "407": {"room_id": 407, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "496": {"room_id": 496, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "434": {"room_id": 434, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "358": {"room_id": 358, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "401": {"room_id": 401, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "135": {"room_id": 135, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "150": {"room_id": 150, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["shiny treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "239": {"room_id": 239, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "244": {"room_id": 244, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "131": {"room_id": 131, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(61,51)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked north.", "Uphill Penalty: 5s CD"]}, "108": {"room_id": 108, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,53)", "elevation": 3, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 20.0, "errors": [], "messages": ["You have walked north.", "Uphill Penalty: 5s CD"]}, "78": {"room_id": 78, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(61,54)", "elevation": 4, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 20.0, "errors": [], "messages": ["You have walked north.", "Uphill Penalty: 5s CD"]}, "25": {"room_id": 25, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(60,56)", "elevation": 3, "terrain": "MOUNTAIN", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "21": {"room_id": 21, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(60,57)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "29": {"room_id": 29, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(59,57)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "45": {"room_id": 45, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(59,56)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 20.0, "errors": [], "messages": ["You have walked south.", "Uphill Penalty: 5s CD"]}, "48": {"room_id": 48, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(60,54)", "elevation": 3, "terrain": "MOUNTAIN", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "149": {"room_id": 149, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(59,54)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "105": {"room_id": 105, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(60,53)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": ["tiny treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "202": {"room_id": 202, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(59,53)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": ["tiny treasure"], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "163": {"room_id": 163, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(58,54)", "elevation": 1, "terrain": "MOUNTAIN", "players": ["User 20668", "User 20730"], "items": [], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "49": {"room_id": 49, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "136": {"room_id": 136, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "148": {"room_id": 148, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(56,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "292": {"room_id": 292, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,57)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "301": {"room_id": 301, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,58)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "small treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "304": {"room_id": 304, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(55,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "79": {"room_id": 79, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,56)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "37": {"room_id": 37, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(63,57)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "50": {"room_id": 50, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(62,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "89": {"room_id": 89, "title": "Mt. Holloway", "description": "You are at the base of a large, looming mountain.", "coordinates": "(62,54)", "elevation": 1, "terrain": "MOUNTAIN", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 20.0, "errors": [], "messages": ["You have walked south.", "Uphill Penalty: 5s CD"]}, "93": {"room_id": 93, "title": "Mt. Holloway", "description": "You are on the side of a steep incline.", "coordinates": "(62,53)", "elevation": 2, "terrain": "MOUNTAIN", "players": [], "items": ["small treasure"], "exits": ["n", "w"], "cooldown": 20.0, "errors": [], "messages": ["You have walked south.", "Uphill Penalty: 5s CD"]}, "138": {"room_id": 138, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "211": {"room_id": 211, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "195": {"room_id": 195, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,51)", "elevation": 0, "terrain": "NORMAL", "players": ["User 20685"], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "228": {"room_id": 228, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "281": {"room_id": 281, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "309": {"room_id": 309, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "326": {"room_id": 326, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "342": {"room_id": 342, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "432": {"room_id": 432, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(61,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "333": {"room_id": 333, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "378": {"room_id": 378, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(60,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "317": {"room_id": 317, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "387": {"room_id": 387, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "431": {"room_id": 431, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,48)", "elevation": 0, "terrain": "NORMAL", "players": ["JonathanJAM"], "items": ["small treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "492": {"room_id": 492, "title": "Sandofsky's Sanctum", "description": "Before you stands a statue of Sandofsky, musclebound hero from times of old: Cold as ice and twice as smooth. You feel a chill as thoughts of algorithms fill the air. Before the statue, a plaque reads, \"Being a Hero, sometimes you must Recall to Zero.\"", "coordinates": "(56,48)", "elevation": 0, "terrain": "NORMAL", "players": ["The_cake_is_a_lie"], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "417": {"room_id": 417, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "409": {"room_id": 409, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(57,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "318": {"room_id": 318, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["shiny treasure", "tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "487": {"room_id": 487, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "489": {"room_id": 489, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(59,46)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "small treasure", "shiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "225": {"room_id": 225, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "278": {"room_id": 278, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(58,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "297": {"room_id": 297, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(64,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "480": {"room_id": 480, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(63,47)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "112": {"room_id": 112, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "140": {"room_id": 140, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "141": {"room_id": 141, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(65,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "156": {"room_id": 156, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "164": {"room_id": 164, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "217": {"room_id": 217, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "247": {"room_id": 247, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "261": {"room_id": 261, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "322": {"room_id": 322, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "382": {"room_id": 382, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "388": {"room_id": 388, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "477": {"room_id": 477, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["shiny treasure", "tiny treasure", "tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "483": {"room_id": 483, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,55)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "435": {"room_id": 435, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,54)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "277": {"room_id": 277, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "323": {"room_id": 323, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "433": {"room_id": 433, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "455": {"room_id": 455, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure", "tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "460": {"room_id": 460, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "298": {"room_id": 298, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,53)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "324": {"room_id": 324, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "354": {"room_id": 354, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "349": {"room_id": 349, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "384": {"room_id": 384, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "356": {"room_id": 356, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,51)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "352": {"room_id": 352, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "362": {"room_id": 362, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "463": {"room_id": 463, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,49)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "468": {"room_id": 468, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "399": {"room_id": 399, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,48)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n", "s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "467": {"room_id": 467, "title": "Pirate Ry's", "description": "You see a sign before you that reads:\n\n'You have found Pirate Ry's. Send a `change_name` request and I'll change your identity to whatever you wish... for a price.'", "coordinates": "(68,47)", "elevation": 0, "terrain": "NORMAL", "players": ["Nazar", "User 20713", "User 20684"], "items": ["small treasure"], "exits": ["n"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "485": {"room_id": 485, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(69,50)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "168": {"room_id": 168, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(66,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "340": {"room_id": 340, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(67,52)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure", "tiny treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "266": {"room_id": 266, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(68,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["small treasure"], "exits": ["w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "416": {"room_id": 416, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(70,62)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "379": {"room_id": 379, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(71,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked south."]}, "395": {"room_id": 395, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "e", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "421": {"room_id": 421, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,60)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": ["tiny treasure"], "exits": ["n", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked east."]}, "440": {"room_id": 440, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(73,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["s", "w"], "cooldown": 15.0, "errors": [], "messages": ["You have walked north."]}, "476": {"room_id": 476, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,61)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["e"], "cooldown": 15.0, "errors": [], "messages": ["You have walked west."]}, "403": {"room_id": 403, "title": "A misty room", "description": "You are standing on grass and surrounded by a dense mist. You can barely make out the exits in any direction.", "coordinates": "(72,59)", "elevation": 0, "terrain": "NORMAL", "players": [], "items": [], "exits": ["n"], "cooldown": 1.0, "errors": [], "messages": []}} \ No newline at end of file diff --git a/load.py b/load.py new file mode 100644 index 00000000..b4bdb9e1 --- /dev/null +++ b/load.py @@ -0,0 +1,27 @@ +import pickle + +def load(): + print('Checking if map saved...') + + try: + with open('map.pickle', 'rb') as f: + graph = pickle.load(f) + print(f"Map contains {len(graph)} nodes.") + print('Map loaded\n') + except FileNotFoundError: + graph = {} + + try: + with open('500rooms.pickle', 'rb') as f: + room_list = pickle.load(f) + print('Map loaded\n') + except FileNotFoundError: + room_list = {} + + return graph, room_list + + +graph, room_list = load() + +print(len(graph)) +print(len(room_list)) \ No newline at end of file diff --git a/map.pickle b/map.pickle new file mode 100644 index 00000000..36d053e8 Binary files /dev/null and b/map.pickle differ diff --git a/map.txt b/map.txt new file mode 100644 index 00000000..daf03c02 --- /dev/null +++ b/map.txt @@ -0,0 +1 @@ +{"373": {"n": 307, "s": 480}, "307": {"n": 230, "s": 373, "e": 371, "w": 321}, "371": {"s": 475, "w": 307}, "475": {"n": 371, "s": 484}, "484": {"n": 475}, "321": {"s": 413, "e": 307}, "413": {"n": 321}, "230": {"n": 199, "s": 307, "e": 297}, "199": {"s": 230, "w": 198}, "198": {"n": 166, "s": 239, "e": 199}, "166": {"s": 198, "e": 150, "w": 117}, "117": {"n": 108, "s": 131, "e": 166, "w": 133}, "133": {"e": 117, "w": 173}, "173": {"e": 133, "w": 214}, "214": {"n": 194, "e": 173, "w": 226}, "226": {"s": 300, "e": 214}, "300": {"n": 226, "s": 377, "w": 389}, "377": {"n": 300}, "389": {"e": 300}, "194": {"s": 214, "w": 129}, "129": {"n": 126, "e": 194, "w": 170}, "170": {"e": 129}, "126": {"n": 98, "s": 129}, "98": {"n": 102, "s": 126, "e": 70, "w": 109}, "102": {"s": 98, "w": 142}, "142": {"e": 102, "w": 159}, "159": {"e": 142, "w": 196}, "196": {"n": 222, "e": 159, "w": 197}, "222": {"n": 305, "s": 196}, "305": {"n": 365, "s": 222}, "365": {"s": 305}, "197": {"n": 232, "e": 196, "w": 276}, "276": {"e": 197, "w": 419}, "419": {"e": 276}, "232": {"n": 272, "s": 197, "w": 235}, "235": {"n": 330, "e": 232, "w": 355}, "355": {"e": 235}, "330": {"n": 369, "s": 235, "w": 383}, "383": {"e": 330, "w": 495}, "495": {"e": 383}, "369": {"n": 400, "s": 330, "w": 376}, "400": {"s": 369}, "376": {"e": 369}, "272": {"n": 295, "s": 232}, "295": {"s": 272}, "109": {"s": 185, "e": 98, "w": 175}, "185": {"n": 109}, "175": {"s": 183, "e": 109, "w": 179}, "179": {"s": 233, "e": 175, "w": 213}, "213": {"e": 179, "w": 420}, "420": {"s": 444, "e": 213, "w": 437}, "444": {"n": 420, "w": 490}, "490": {"e": 444, "w": 493}, "493": {"e": 490}, "437": {"e": 420, "w": 497}, "497": {"e": 437}, "233": {"n": 179, "w": 238}, "238": {"e": 233}, "183": {"n": 175, "s": 229}, "229": {"n": 183, "s": 250, "w": 236}, "250": {"n": 229, "s": 294, "e": 289}, "289": {"w": 250}, "294": {"n": 250, "s": 334}, "334": {"n": 294, "s": 393, "e": 341, "w": 391}, "393": {"n": 334, "s": 482}, "482": {"n": 393}, "341": {"s": 449, "w": 334}, "449": {"n": 341}, "391": {"s": 396, "e": 334, "w": 428}, "428": {"e": 391}, "396": {"n": 391}, "236": {"s": 264, "e": 229}, "264": {"n": 236, "s": 274, "w": 273}, "274": {"n": 264, "w": 308}, "308": {"e": 274}, "273": {"n": 343, "e": 264}, "343": {"s": 273, "w": 351}, "351": {"s": 491, "e": 343, "w": 478}, "478": {"e": 351}, "491": {"n": 351}, "70": {"s": 163, "e": 60, "w": 98}, "60": {"n": 45, "e": 36, "w": 70}, "36": {"s": 48, "e": 22, "w": 60}, "22": {"n": 18, "s": 78, "w": 36}, "18": {"n": 12, "s": 22, "w": 25}, "12": {"n": 9, "s": 18, "e": 14, "w": 21}, "9": {"n": 3, "s": 12, "e": 11}, "11": {"e": 17, "w": 9}, "17": {"n": 24, "e": 42, "w": 11}, "24": {"s": 17}, "42": {"n": 44, "s": 80, "e": 118, "w": 17}, "80": {"n": 42, "s": 81, "e": 86}, "81": {"n": 80}, "86": {"s": 96, "e": 90, "w": 80}, "90": {"e": 178, "w": 86}, "178": {"n": 209, "e": 243, "w": 90}, "209": {"s": 178}, "243": {"s": 293, "e": 256, "w": 178}, "293": {"n": 243}, "256": {"s": 360, "e": 327, "w": 243}, "327": {"e": 427, "w": 256}, "427": {"e": 430, "w": 327}, "430": {"n": 443, "e": 439, "w": 427}, "443": {"s": 430, "e": 471}, "471": {"w": 443}, "439": {"w": 430}, "360": {"n": 256, "e": 398}, "398": {"e": 438, "w": 360}, "438": {"e": 465, "w": 398}, "465": {"e": 498, "w": 438}, "498": {"w": 465}, "96": {"n": 86, "e": 97}, "97": {"e": 181, "w": 96}, "181": {"w": 97}, "118": {"e": 137, "w": 42}, "137": {"w": 118}, "44": {"s": 42}, "3": {"s": 9, "e": 5, "w": 2}, "2": {"n": 0, "s": 6, "e": 3}, "0": {"n": 10, "s": 2, "e": 4, "w": 1}, "1": {"e": 0}, "10": {"n": 19, "s": 0, "w": 43}, "19": {"n": 20, "s": 10, "w": 77}, "77": {"e": 19}, "20": {"n": 63, "s": 19, "e": 27, "w": 46}, "46": {"e": 20, "w": 62}, "62": {"n": 64, "e": 46, "w": 84}, "64": {"s": 62, "w": 82}, "82": {"n": 191, "e": 64}, "191": {"s": 82}, "84": {"e": 62, "w": 91}, "91": {"n": 180, "s": 101, "e": 84, "w": 99}, "99": {"n": 190, "e": 91, "w": 146}, "146": {"n": 215, "s": 177, "e": 99, "w": 257}, "257": {"n": 320, "e": 146, "w": 364}, "364": {"n": 429, "s": 381, "e": 257, "w": 448}, "448": {"e": 364}, "429": {"s": 364}, "381": {"n": 364, "w": 394}, "394": {"e": 381}, "320": {"n": 348, "s": 257}, "348": {"s": 320}, "215": {"n": 246, "s": 146}, "246": {"s": 215}, "177": {"n": 146, "w": 346}, "346": {"e": 177}, "190": {"s": 99}, "101": {"n": 91, "w": 113}, "113": {"s": 114, "e": 101}, "114": {"n": 113, "w": 176}, "176": {"e": 114, "w": 402}, "402": {"e": 176, "w": 451}, "451": {"e": 402, "w": 453}, "453": {"s": 464, "e": 451}, "464": {"n": 453}, "180": {"s": 91}, "63": {"n": 72, "s": 20, "w": 73}, "72": {"s": 63, "w": 76}, "76": {"n": 83, "e": 72, "w": 110}, "110": {"e": 76}, "83": {"s": 76, "e": 130, "w": 125}, "130": {"w": 83}, "125": {"n": 165, "e": 83, "w": 237}, "165": {"n": 203, "s": 125, "w": 204}, "204": {"n": 219, "e": 165, "w": 216}, "219": {"s": 204}, "216": {"n": 234, "e": 204, "w": 218}, "234": {"n": 368, "s": 216, "w": 252}, "252": {"n": 284, "e": 234}, "284": {"n": 302, "s": 252, "w": 303}, "302": {"n": 422, "s": 284}, "422": {"n": 426, "s": 302}, "426": {"n": 457, "s": 422}, "457": {"n": 461, "s": 426}, "461": {"s": 457}, "303": {"n": 361, "e": 284, "w": 405}, "405": {"n": 406, "e": 303}, "406": {"s": 405, "w": 415}, "415": {"e": 406, "w": 418}, "418": {"n": 425, "s": 474, "e": 415}, "474": {"n": 418}, "425": {"s": 418, "w": 469}, "469": {"e": 425}, "361": {"n": 408, "s": 303}, "408": {"n": 458, "s": 361, "w": 423}, "458": {"s": 408, "w": 459}, "459": {"e": 458}, "423": {"e": 408, "w": 454}, "454": {"n": 470, "e": 423}, "470": {"s": 454}, "368": {"s": 234}, "218": {"s": 263, "e": 216, "w": 242}, "263": {"n": 218}, "242": {"n": 287, "s": 259, "e": 218, "w": 275}, "275": {"e": 242, "w": 456}, "456": {"e": 275, "w": 499}, "499": {"e": 456}, "287": {"s": 242, "w": 339}, "339": {"e": 287, "w": 445}, "445": {"n": 447, "e": 339, "w": 450}, "450": {"e": 445}, "447": {"s": 445}, "259": {"n": 242, "w": 310}, "310": {"e": 259, "w": 412}, "412": {"s": 488, "e": 310}, "488": {"n": 412}, "203": {"n": 268, "s": 165, "e": 299}, "299": {"e": 311, "w": 203}, "311": {"w": 299}, "268": {"s": 203, "e": 411, "w": 312}, "411": {"w": 268}, "312": {"n": 328, "e": 268}, "328": {"n": 332, "s": 312, "e": 357, "w": 363}, "363": {"n": 372, "e": 328}, "372": {"n": 441, "s": 363}, "441": {"s": 372}, "332": {"n": 350, "s": 328}, "350": {"n": 436, "s": 332, "e": 404}, "436": {"s": 350}, "404": {"n": 481, "w": 350}, "481": {"s": 404}, "357": {"w": 328}, "237": {"e": 125, "w": 245}, "245": {"s": 254, "e": 237}, "254": {"n": 245, "w": 314}, "314": {"e": 254}, "73": {"e": 63}, "27": {"n": 40, "s": 28, "e": 30, "w": 20}, "30": {"s": 31, "e": 32, "w": 27}, "32": {"n": 39, "e": 54, "w": 30}, "39": {"n": 53, "s": 32, "e": 51, "w": 41}, "51": {"n": 69, "e": 57, "w": 39}, "57": {"e": 145, "w": 51}, "145": {"n": 174, "e": 220, "w": 57}, "220": {"w": 145}, "174": {"n": 192, "s": 145, "e": 224}, "192": {"n": 201, "s": 174, "e": 223}, "201": {"s": 192}, "223": {"n": 283, "w": 192}, "283": {"n": 331, "s": 223, "e": 313}, "331": {"s": 283, "e": 446}, "446": {"e": 466, "w": 331}, "466": {"s": 486, "e": 472, "w": 446}, "472": {"w": 466}, "486": {"n": 466}, "313": {"w": 283}, "224": {"w": 174}, "69": {"n": 94, "s": 51, "e": 103}, "103": {"n": 160, "w": 69}, "160": {"s": 103}, "94": {"n": 152, "s": 69}, "152": {"s": 94}, "41": {"e": 39}, "53": {"n": 95, "s": 39, "w": 88}, "88": {"e": 53, "w": 122}, "122": {"n": 124, "e": 88}, "124": {"n": 157, "s": 122}, "157": {"n": 210, "s": 124, "w": 182}, "210": {"s": 157}, "182": {"e": 157, "w": 208}, "208": {"e": 182}, "95": {"n": 119, "s": 53, "w": 115}, "119": {"n": 134, "s": 95}, "134": {"n": 147, "s": 119, "e": 144}, "144": {"e": 155, "w": 134}, "155": {"s": 187, "e": 316, "w": 144}, "187": {"n": 155}, "316": {"n": 344, "w": 155}, "344": {"n": 392, "s": 316, "e": 390}, "390": {"w": 344}, "392": {"s": 344, "e": 462}, "462": {"w": 392}, "147": {"n": 200, "s": 134, "e": 153, "w": 151}, "153": {"e": 329, "w": 147}, "329": {"w": 153}, "200": {"n": 227, "s": 147, "e": 206}, "227": {"n": 269, "s": 200}, "269": {"n": 319, "s": 227}, "319": {"n": 359, "s": 269, "e": 345}, "359": {"s": 319}, "345": {"s": 375, "w": 319}, "375": {"n": 345, "e": 385}, "385": {"w": 375}, "206": {"n": 288, "e": 380, "w": 200}, "380": {"n": 424, "w": 206}, "424": {"s": 380, "e": 473}, "473": {"e": 494, "w": 424}, "494": {"w": 473}, "288": {"s": 206}, "151": {"n": 172, "e": 147, "w": 207}, "172": {"n": 267, "s": 151}, "267": {"n": 285, "s": 172, "w": 271}, "271": {"n": 337, "e": 267}, "337": {"s": 271}, "285": {"n": 286, "s": 267}, "286": {"n": 336, "s": 285, "w": 291}, "291": {"n": 410, "e": 286, "w": 347}, "410": {"s": 291}, "347": {"n": 452, "s": 442, "e": 291}, "452": {"s": 347}, "442": {"n": 347}, "336": {"s": 286}, "207": {"n": 231, "e": 151, "w": 290}, "290": {"e": 207}, "231": {"s": 207, "w": 248}, "248": {"n": 296, "e": 231, "w": 280}, "280": {"n": 325, "e": 248}, "325": {"n": 353, "s": 280, "w": 374}, "353": {"s": 325}, "374": {"e": 325}, "296": {"s": 248}, "115": {"n": 116, "e": 95}, "116": {"n": 132, "s": 115}, "132": {"s": 116}, "54": {"w": 32}, "31": {"n": 30, "e": 33}, "33": {"e": 38, "w": 31}, "38": {"s": 59, "e": 66, "w": 33}, "66": {"n": 169, "e": 123, "w": 38}, "123": {"w": 66}, "169": {"s": 66, "e": 186}, "186": {"e": 205, "w": 169}, "205": {"s": 241, "e": 479, "w": 186}, "479": {"w": 205}, "241": {"n": 205, "e": 266}, "338": {"s": 379, "w": 270}, "270": {"n": 416, "e": 338, "w": 265}, "265": {"n": 279, "s": 249, "e": 270}, "279": {"s": 265}, "249": {"n": 265, "s": 240, "e": 282}, "282": {"w": 249}, "240": {"n": 249, "e": 386, "w": 221}, "386": {"e": 414, "w": 240}, "414": {"w": 386}, "221": {"s": 253, "e": 240, "w": 184}, "253": {"n": 221, "e": 258}, "258": {"e": 306, "w": 253}, "306": {"e": 397, "w": 258}, "397": {"w": 306}, "184": {"e": 221, "w": 127}, "127": {"e": 184, "w": 120}, "120": {"n": 107, "e": 127}, "107": {"s": 120, "e": 121, "w": 104}, "104": {"n": 59, "e": 107}, "59": {"n": 38, "s": 104, "e": 92}, "92": {"w": 59}, "121": {"n": 128, "e": 143, "w": 107}, "143": {"e": 212, "w": 121}, "212": {"w": 143}, "128": {"s": 121, "e": 189}, "189": {"e": 255, "w": 128}, "255": {"w": 189}, "28": {"n": 27}, "40": {"s": 27}, "43": {"e": 10, "w": 47}, "47": {"n": 71, "e": 43}, "71": {"s": 47}, "4": {"n": 23, "e": 13, "w": 0}, "13": {"e": 15, "w": 4}, "15": {"w": 13}, "23": {"s": 4, "e": 26}, "26": {"e": 55, "w": 23}, "55": {"w": 26}, "6": {"n": 2, "w": 7}, "7": {"n": 8, "e": 6, "w": 56}, "56": {"e": 7, "w": 61}, "61": {"e": 56, "w": 171}, "171": {"e": 61}, "8": {"s": 7, "w": 16}, "16": {"n": 58, "e": 8, "w": 67}, "58": {"s": 16, "w": 65}, "65": {"n": 74, "e": 58, "w": 139}, "139": {"e": 65, "w": 188}, "188": {"e": 139, "w": 335}, "335": {"e": 188, "w": 366}, "366": {"e": 335}, "74": {"n": 87, "s": 65, "w": 161}, "87": {"s": 74}, "161": {"e": 74}, "67": {"e": 16, "w": 162}, "162": {"e": 67}, "5": {"w": 3}, "14": {"s": 34, "e": 37, "w": 12}, "34": {"n": 14, "s": 50, "e": 35}, "35": {"s": 52, "w": 34}, "52": {"n": 35, "s": 68, "e": 75}, "75": {"e": 85, "w": 52}, "85": {"e": 154, "w": 75}, "154": {"e": 193, "w": 85}, "193": {"e": 251, "w": 154}, "251": {"e": 315, "w": 193}, "315": {"w": 251}, "68": {"n": 52, "e": 100}, "100": {"s": 106, "e": 112, "w": 68}, "106": {"n": 100, "s": 111, "w": 135}, "111": {"n": 106, "s": 367, "e": 158}, "367": {"n": 111}, "158": {"s": 167, "w": 111}, "167": {"n": 158, "s": 262, "e": 260}, "260": {"w": 167}, "262": {"n": 167, "s": 370, "e": 358}, "370": {"n": 262, "s": 434, "e": 407}, "407": {"s": 496, "w": 370}, "496": {"n": 407}, "434": {"n": 370}, "358": {"e": 401, "w": 262}, "401": {"w": 358}, "135": {"s": 150, "e": 106}, "150": {"n": 135, "w": 166}, "239": {"n": 198, "w": 244}, "244": {"n": 131, "e": 239}, "131": {"n": 117, "s": 244, "w": 138}, "108": {"n": 78, "s": 117, "e": 93}, "78": {"n": 22, "s": 108}, "25": {"e": 18}, "21": {"e": 12, "w": 29}, "29": {"s": 45, "e": 21, "w": 49}, "45": {"n": 29, "s": 60}, "48": {"n": 36, "s": 105, "w": 149}, "149": {"e": 48}, "105": {"n": 48, "w": 202}, "202": {"e": 105}, "163": {"n": 70}, "49": {"s": 79, "e": 29, "w": 136}, "136": {"e": 49, "w": 148}, "148": {"e": 136, "w": 292}, "292": {"n": 301, "e": 148}, "301": {"n": 304, "s": 292}, "304": {"s": 301}, "79": {"n": 49}, "37": {"w": 14}, "50": {"n": 34, "s": 89}, "89": {"n": 50, "s": 93}, "93": {"n": 89, "w": 108}, "138": {"s": 211, "e": 131, "w": 195}, "211": {"n": 138}, "195": {"s": 228, "e": 138, "w": 225}, "228": {"n": 195, "s": 281}, "281": {"n": 228, "s": 318, "e": 309, "w": 317}, "309": {"s": 333, "e": 326, "w": 281}, "326": {"s": 342, "w": 309}, "342": {"n": 326, "s": 432}, "432": {"n": 342}, "333": {"n": 309, "s": 378}, "378": {"n": 333}, "317": {"s": 387, "e": 281, "w": 409}, "387": {"n": 317, "s": 417, "w": 431}, "431": {"e": 387, "w": 492}, "492": {"e": 431}, "417": {"n": 387}, "409": {"e": 317}, "318": {"n": 281, "s": 487}, "487": {"n": 318, "s": 489}, "489": {"n": 487}, "225": {"s": 278, "e": 195}, "278": {"n": 225}, "297": {"w": 230}, "480": {"n": 373}, "112": {"s": 141, "e": 140, "w": 100}, "140": {"w": 112}, "141": {"n": 112, "e": 156}, "156": {"s": 168, "e": 164, "w": 141}, "164": {"n": 217, "e": 298, "w": 156}, "217": {"s": 164, "e": 247}, "247": {"e": 261, "w": 217}, "261": {"s": 277, "e": 322, "w": 247}, "322": {"n": 382, "e": 435, "w": 261}, "382": {"s": 322, "e": 388}, "388": {"e": 477, "w": 382}, "477": {"e": 483, "w": 388}, "483": {"w": 477}, "435": {"w": 322}, "277": {"n": 261, "e": 323}, "323": {"e": 433, "w": 277}, "433": {"s": 455, "e": 460, "w": 323}, "455": {"n": 433}, "460": {"w": 433}, "298": {"s": 324, "w": 164}, "324": {"n": 298, "s": 349, "e": 354}, "354": {"w": 324}, "349": {"n": 324, "s": 352, "e": 384, "w": 356}, "384": {"w": 349}, "356": {"e": 349}, "352": {"n": 349, "s": 362, "e": 485}, "362": {"n": 352, "s": 399, "w": 463}, "463": {"s": 468, "e": 362}, "468": {"n": 463}, "399": {"n": 362, "s": 467}, "467": {"n": 399}, "485": {"w": 352}, "168": {"n": 156, "e": 340}, "340": {"w": 168}, "266": {"w": 241}, "416": {"s": 270}, "379": {"n": 338, "e": 395}, "395": {"s": 403, "e": 421, "w": 379}, "421": {"n": 440, "w": 395}, "440": {"s": 421, "w": 476}, "476": {"e": 440}, "403": {"n": 395}} \ No newline at end of file diff --git a/move_REPL.py b/move_REPL.py new file mode 100644 index 00000000..14b43dfa --- /dev/null +++ b/move_REPL.py @@ -0,0 +1,52 @@ +# Initialize +import requests +import sys +import time +import math + +token = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() + +print(response) + +cooldown = response["cooldown"] # is this right? + +# Move +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} + +moving = True +while moving: + print("Enter the direction you'd like to move: ") + direction = input() + # print(direction) + + if direction == 'exit': + moving = False + break + + data = '{"direction":"' + direction + '"}' + + response = requests.post(url + '/api/adv/move/', headers=headers, data=data) + print(response.text) + + json_response = response.json() + cooldown = json_response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown: {cooldown_rounded_up - i}...', end="\r") + time.sleep(1) + #curl -X GET -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' https://lambda-treasure-hunt.herokuapp.com/api/adv/init/ + #curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" -d '{"name":"treasure"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/take/ + #curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ + #curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" -d '{"name":"tiny treasure", "confirm":"yes"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/ + #curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" -d '{"name":"tiny treasure"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/drop/ \ No newline at end of file diff --git a/move_sell_pray/client.py b/move_sell_pray/client.py new file mode 100644 index 00000000..383c2a75 --- /dev/null +++ b/move_sell_pray/client.py @@ -0,0 +1,743 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work +import zmq + +context = zmq.Context() +socket = context.socket(zmq.REQ) +socket.connect("tcp://0.tcp.ngrok.io:14397") + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + # for i in range(0, cooldown_rounded_up): + # print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(cooldown) + +def cooldown_func_snitch(response, snitch_room): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + f = open("snitch_room.txt","r+") + snitch_room_copy = int(f.readline()) + f.close() + if snitch_room != snitch_room_copy: + break + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" -d '{"name":"nice jacket"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/take/ +# curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] +if curr_id > 500: + wrapped = True +else: + wrapped = False + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +for id_in_path in path: + # print(id_in_path) + # print(path[id_in_path]) + # print(path_reverse[id_in_path]) + visited[id_in_path] = {} + # print(visited) + for direction in path[id_in_path]: + visited[id_in_path][direction] = '?' + + +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [1,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def get_snitch_room(): + socket.send(b'') + message = socket.recv() + snitch_room = int(message) + return snitch_room +def dash_fly(curr_id,destination): + # f = open("snitch_room.txt","r+") + # snitch_room = int(f.readline()) + # f.close() + + snitch_room = get_snitch_room() + print(snitch_room) + snitch_room_copy = int(snitch_room) + while True: + snitch_room_copy = get_snitch_room() + if snitch_room_copy is None: + continue + elif snitch_room == snitch_room_copy: + continue + + + traversal_path = g.bfs(curr_id, snitch_room_copy) + i = 0 + ids = [] + directions = [] + # print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + if len(listy) >= 4: + print('==== NO GO =====') + # f = open("snitch_room.txt","r+") + snitch_room = int(get_snitch_room()) + # f.close() + continue + for i in range(len(listy)): + # f = open("snitch_room.txt","r+") + snitch_room = int(get_snitch_room()) + # f.close() + if snitch_room_copy != snitch_room: + break + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + cooldown_func(next_room) + curr_id = next_room['room_id'] + print(f"room: {next_room['room_id']}") + + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + cooldown_func(next_room) + print(next_room) + print(f"room: {next_room['room_id']}") + # cooldown_func(next_room) + curr_id = next_room['room_id'] + + # f = open("snitch_room.txt","r+") + # snitch_room = int(get_snitch_room()) + # # f.close() + # if snitch_room_copy != snitch_room: + # continue + # else: + + data = '{"name":"golden snitch"}' + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + if len(take_snitch['errors']) > 0: + cooldown_func(take_snitch) + continue + else: + print(take_snitch) + print('=============== Took SNITCH! ===============\n' + '++++++++++++++++++++++++++++++++++++++++++++++') + cooldown_func(take_snitch) + status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + print(status) + + + return destination + + +def go_to_wishing_well_snitch(curr_id, wishing_well=55, alternative=False): + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + snitch_room_copy = '' + while True: + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + if snitch_room_copy == snitch_room: + continue + f = open("snitch_room.txt","w") + f.write(str(snitch_room)) + f.close() + snitch_room_copy = int(snitch_room) + print('=================== Going to to get snitch ===================') + snitch_room = dash_fly(curr_id_1, snitch_room, headers=headers) + + data = '{"name":"golden snitch"}' + + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + + + # cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + + + return snitch_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + transmogrifier_room = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + + + # if "{}" not in response_examin['attributes']: + + # transmogrifier_data = '{"name":"'+i+'"}' + # transmogrifier_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/transmogrify/', + # headers=headers, data=transmogrifier_data).json() + # print(f'Item {i}\n') + # sold = True + # print(transmogrifier_response) + # cooldown_func(transmogrifier_response) + + # n += 1 + # print(n) + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # for i in inventory: + # print(f'item: {i}') + # while True: + # print(inventory) + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["examine", "wear", "undress","choose"]: + # # player.travel(cmds[0], True) + # if cmds[0] == 'choose': + # i = cmds[1] + # data = '{"name":"[' + str(i) +']"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + # print(take_examin) + # elif cmds[0] == "q": + # break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + print(response) + +def grab_snitch(curr_id): + print('=================== Going to to get snitch ===================') + # f = open("snitch_room.txt","r+") + # snitch_room = int(f.readline()) + # f.close() + # print(snitch_room) + socket.send(b'') + message = socket.recv() + print("Socket: " + str(int(message))) + snitch_room = int(message) + snitch_room = dash_fly(curr_id, snitch_room) + + + + # cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + + # if wrapped == True: + # print('=============== lets wish and mine =============') + # new_id = go_to_wishing_well_mine(curr_id) + + if wrapped == False: + print('========================= Getting that snitch ==================') + warp() + wrapped = True + # grab_snitch(curr_id) + + + + elif wrapped == True: + print('========================= Getting that snitch ==================') + # curr_id = dash_fly(curr_id, wishing_well) + grab_snitch(curr_id) + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + if ('snitch' in next_room['players']) or ('snitch' in next_room['title']) or ('snitch' in next_room['description']) | (next_room_id == 986): + print(f'Room Info: {next_room}') + while True: + + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify', 'take']: + # player.travel(cmds[0], True) + if len(cmds[1:]) == 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[1:]) == 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + # if (len(next_room['items']) > 0): + # weights = [] + + # for i in next_room['items']: + # data_items = '{"name":"'+ i +'"}' + # response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + # headers=headers, data=data_items).json() + # print('Exmaning items\n') + # print(response_examin) + # cooldown_func(response_examin) + + # # if (armor == None) | (shoes == None): + + # # data_wear = '{"name":"'+ i +'"}' + # # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # # headers=headers, data=data_wear).json() + # # cooldown_func(response_wear) + # # print(response_wear) + # # print(f'Wore item: {i}\n') + # # # next_room['items'].remove(i) + # # print('Getting status after wearing\n') + # # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # # print(f'Armore: {armor}, Shoes: {shoes}') + # if "{}" not in response_examin['attributes']: + # if (encumbrance + response_examin['weight']) < strength: + # name_item = i + + # data_items = '{"name":"' + name_item + '"}' + + # response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + # headers=headers, data=data_items).json() + # print('Picked up item\n') + # cooldown_func(response_items) + # encumbrance += response_examin['weight'] + # inventory.append(name_item) + # elif (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(f'Wore item: {i}\n') + # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + # if (encumbrance == strength) | (strength - encumbrance) == 1: + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while s.size() > 0: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/client_stephen.py b/move_sell_pray/client_stephen.py new file mode 100644 index 00000000..0319b016 --- /dev/null +++ b/move_sell_pray/client_stephen.py @@ -0,0 +1,742 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work +import zmq + +context = zmq.Context() +socket = context.socket(zmq.REQ) +socket.connect("tcp://0.tcp.ngrok.io:14397") + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + # for i in range(0, cooldown_rounded_up): + # print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(cooldown) + +def cooldown_func_snitch(response, snitch_room): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + f = open("snitch_room.txt","r+") + snitch_room_copy = int(f.readline()) + f.close() + if snitch_room != snitch_room_copy: + break + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" -d '{"name":"nice jacket"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/take/ +# curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] +if curr_id > 500: + wrapped = True +else: + wrapped = False + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +for id_in_path in path: + # print(id_in_path) + # print(path[id_in_path]) + # print(path_reverse[id_in_path]) + visited[id_in_path] = {} + # print(visited) + for direction in path[id_in_path]: + visited[id_in_path][direction] = '?' + + +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [1,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def get_snitch_room(): + socket.send(b'') + message = socket.recv() + snitch_room = int(message) + return snitch_room +def dash_fly(curr_id,destination): + # f = open("snitch_room.txt","r+") + # snitch_room = int(f.readline()) + # f.close() + + snitch_room = get_snitch_room() + print(snitch_room) + snitch_room_copy = int(snitch_room) + while True: + snitch_room_copy = get_snitch_room() + if snitch_room_copy is None: + continue + elif snitch_room == snitch_room_copy: + continue + + + traversal_path = g.bfs(curr_id, snitch_room_copy) + i = 0 + ids = [] + directions = [] + # print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + if len(listy) >= 4: + print('==== NO GO =====') + # f = open("snitch_room.txt","r+") + snitch_room = int(get_snitch_room()) + # f.close() + continue + for i in range(len(listy)): + # f = open("snitch_room.txt","r+") + snitch_room = int(get_snitch_room()) + # f.close() + if snitch_room_copy != snitch_room: + break + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + cooldown_func(next_room) + curr_id = next_room['room_id'] + print(f"room: {next_room['room_id']}") + + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + cooldown_func(next_room) + print(f"room: {next_room['room_id']}") + # cooldown_func(next_room) + curr_id = next_room['room_id'] + + # f = open("snitch_room.txt","r+") + # snitch_room = int(get_snitch_room()) + # # f.close() + # if snitch_room_copy != snitch_room: + # continue + # else: + + data = '{"name":"golden snitch"}' + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + if len(take_snitch['errors']) > 0: + cooldown_func(take_snitch) + continue + else: + print(take_snitch) + print('=============== Took SNITCH! ===============\n' + '++++++++++++++++++++++++++++++++++++++++++++++') + cooldown_func(take_snitch) + status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + print(status) + + + return destination + + +def go_to_wishing_well_snitch(curr_id, wishing_well=55, alternative=False): + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + snitch_room_copy = '' + while True: + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + if snitch_room_copy == snitch_room: + continue + f = open("snitch_room.txt","w") + f.write(str(snitch_room)) + f.close() + snitch_room_copy = int(snitch_room) + print('=================== Going to to get snitch ===================') + snitch_room = dash_fly(curr_id_1, snitch_room, headers=headers) + + data = '{"name":"golden snitch"}' + + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + + + # cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + + + return snitch_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + transmogrifier_room = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + + + # if "{}" not in response_examin['attributes']: + + # transmogrifier_data = '{"name":"'+i+'"}' + # transmogrifier_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/transmogrify/', + # headers=headers, data=transmogrifier_data).json() + # print(f'Item {i}\n') + # sold = True + # print(transmogrifier_response) + # cooldown_func(transmogrifier_response) + + # n += 1 + # print(n) + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # for i in inventory: + # print(f'item: {i}') + # while True: + # print(inventory) + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["examine", "wear", "undress","choose"]: + # # player.travel(cmds[0], True) + # if cmds[0] == 'choose': + # i = cmds[1] + # data = '{"name":"[' + str(i) +']"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + # print(take_examin) + # elif cmds[0] == "q": + # break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + print(response) + +def grab_snitch(curr_id): + print('=================== Going to to get snitch ===================') + # f = open("snitch_room.txt","r+") + # snitch_room = int(f.readline()) + # f.close() + # print(snitch_room) + socket.send(b'') + message = socket.recv() + print("Socket: " + str(int(message))) + snitch_room = int(message) + snitch_room = dash_fly(curr_id, snitch_room) + + + + # cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + + # if wrapped == True: + # print('=============== lets wish and mine =============') + # new_id = go_to_wishing_well_mine(curr_id) + + if wrapped == False: + print('========================= Getting that snitch ==================') + warp() + wrapped = True + # grab_snitch(curr_id) + + + + elif wrapped == True: + print('========================= Getting that snitch ==================') + # curr_id = dash_fly(curr_id, wishing_well) + grab_snitch(curr_id) + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + if ('snitch' in next_room['players']) or ('snitch' in next_room['title']) or ('snitch' in next_room['description']) | (next_room_id == 986): + print(f'Room Info: {next_room}') + while True: + + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify', 'take']: + # player.travel(cmds[0], True) + if len(cmds[1:]) == 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[1:]) == 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + # if (len(next_room['items']) > 0): + # weights = [] + + # for i in next_room['items']: + # data_items = '{"name":"'+ i +'"}' + # response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + # headers=headers, data=data_items).json() + # print('Exmaning items\n') + # print(response_examin) + # cooldown_func(response_examin) + + # # if (armor == None) | (shoes == None): + + # # data_wear = '{"name":"'+ i +'"}' + # # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # # headers=headers, data=data_wear).json() + # # cooldown_func(response_wear) + # # print(response_wear) + # # print(f'Wore item: {i}\n') + # # # next_room['items'].remove(i) + # # print('Getting status after wearing\n') + # # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # # print(f'Armore: {armor}, Shoes: {shoes}') + # if "{}" not in response_examin['attributes']: + # if (encumbrance + response_examin['weight']) < strength: + # name_item = i + + # data_items = '{"name":"' + name_item + '"}' + + # response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + # headers=headers, data=data_items).json() + # print('Picked up item\n') + # cooldown_func(response_items) + # encumbrance += response_examin['weight'] + # inventory.append(name_item) + # elif (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(f'Wore item: {i}\n') + # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + # if (encumbrance == strength) | (strength - encumbrance) == 1: + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while s.size() > 0: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/cpu.py b/move_sell_pray/cpu.py new file mode 100644 index 00000000..75cb2f0b --- /dev/null +++ b/move_sell_pray/cpu.py @@ -0,0 +1,299 @@ +"""CPU functionality.""" + +import sys + + + # f'self.{i.keys}' = +# for i in OPCODES: +# print(vars('self').i) + +class CPU: + """Main CPU class.""" + + def __init__(self): + """Construct a new CPU.""" + self.OPCODES = { + "ADD": {"type": 2, "code": "10100000"}, + "AND": {"type": 2, "code": "10101000"}, + "CALL": {"type": 1, "code": "01010000"}, + "CMP": {"type": 2, "code": "10100111"}, + "DEC": {"type": 1, "code": "01100110"}, + "DIV": {"type": 2, "code": "10100011"}, + "HLT": {"type": 0, "code": "00000001"}, + "INC": {"type": 1, "code": "01100101"}, + "INT": {"type": 1, "code": "01010010"}, + "IRET": {"type": 0, "code": "00010011"}, + "JEQ": {"type": 1, "code": "01010101"}, + "JGE": {"type": 1, "code": "01011010"}, + "JGT": {"type": 1, "code": "01010111"}, + "JLE": {"type": 1, "code": "01011001"}, + "JLT": {"type": 1, "code": "01011000"}, + "JMP": {"type": 1, "code": "01010100"}, + "JNE": {"type": 1, "code": "01010110"}, + "LD": {"type": 2, "code": "10000011"}, + "LDI": {"type": 8, "code": "10000010"}, + "MOD": {"type": 2, "code": "10100100"}, + "MUL": {"type": 2, "code": "10100010"}, + "NOP": {"type": 0, "code": "00000000"}, + "NOT": {"type": 1, "code": "01101001"}, + "OR": {"type": 2, "code": "10101010"}, + "POP": {"type": 1, "code": "01000110"}, + "PRA": {"type": 1, "code": "01001000"}, + "PRN": {"type": 1, "code": "01000111"}, + "PUSH": {"type": 1, "code": "01000101"}, + "RET": {"type": 0, "code": "00010001"}, + "SHL": {"type": 2, "code": "10101100"}, + "SHR": {"type": 2, "code": "10101101"}, + "ST": {"type": 2, "code": "10000100"}, + "SUB": {"type": 2, "code": "10100001"}, + "XOR": {"type": 2, "code": "10101011"}, + } + self.ram = [0] * 256 + self.reg = [0] * 8 + self.SP = 7 + self.reg[self.SP] = 0xF4 + self.pc = 0 + self.fl = 0b00000000 + self.mine_room = '' + + # Instructions: + for i in self.OPCODES: + vars(self)[i] = int(self.OPCODES[i]['code'], 2) + # print(bin(int(self.OPCODES[i]['code'], 2))) + # type_pc = bin(vars(self)[i]) >> 6 + # print(type_pc) + # vars(self)[i]['_pc_type'] = int(str(self.OPCODES[i]['code'])[:2],2) + # print(vars(self)[i]) + + + # self.HLT = 1 + # self.PRINT_NUM = 3 + # self.SAVE = 130 # Save a value to a register + # self.PRINT_REGISTER = 71 # Print the value in a register + # self.ADD = 6 + # self.SUB = 7 + # self.MUL = 162 + # self.DIV = 9 + + def load(self, program): + """Load a program into memory.""" + + address = 0 + + # For now, we've just hardcoded a program: + + # program = [ + # # From print8.ls8 + # 0b10000010, # LDI R0,8 + # 0b00000000, + # 0b00001000, + # 0b01000111, # PRN R0 + # 0b00000000, + # 0b00000001, # HLT + # ] + + path = program + address = 0 + with open(path) as f: + for line in f: + # skip empty lines and comments + if line[0].isnumeric()==False: + continue + self.ram[address] = int(line[0:8], 2) + address += 1 + + # for instruction in program: + + # self.ram[address] = instruction + # address += 1 + + + def alu(self, op, reg_a, reg_b): + """ALU operations.""" + a_value = self.reg[reg_a] + b_value = self.reg[reg_b] + + if op == self.ADD: + self.reg[reg_a] += b_value + elif op == self.SUB: + self.reg[reg_a] -= b_value + elif op == self.MUL: + self.reg[reg_a] *= b_value + elif op == self.DIV: + self.reg[reg_a] /= b_value + # CMP + elif op == self.CMP: + if a_value == b_value: + self.flag = 0b00000001 + elif a_value > b_value: + self.flag = 0b00000100 + elif a_value < b_value: + self.flag = 0b00000010 + elif op == self.AND: + self.reg[reg_a] = a_value & b_value + elif op == self.OR: + self.reg[reg_a] = a_value | b_value + elif op == self.XOR: + self.reg[reg_a] = a_value ^ b_value + else: + raise Exception("Unsupported ALU operation") + + def pra(self, reg_address): + # print(self.reg[reg_address]) + # print(self.reg[reg_address][-3:]) + # return + output = chr(self.reg[reg_address]) + if output.isnumeric(): + self.mine_room = self.mine_room + output + # self.mine_room.append(chr(self.reg[reg_address])) + # print(self.mine_room) + # print(chr(self.reg[reg_address])) + + def trace(self): + """ + Handy function to print out the CPU state. You might want to call this + from run() if you need help debugging. + """ + + print(f"TRACE: %02X | %02X %02X %02X |" % ( + self.pc, + #self.fl, + #self.ie, + self.ram_read(self.pc), + self.ram_read(self.pc + 1), + self.ram_read(self.pc + 2) + ), end='') + + for i in range(8): + print(" %02X" % self.reg[i], end='') + + print() + + def ram_read(self, MAR): + return self.ram[MAR] + + def ram_write(self, MDR, MAR): + self.ram[MAR] = MDR + + def run(self): + """Run the CPU.""" + + ir = [0] * 8 + math_op = [self.ADD, self.SUB, self.MUL, + self.DIV, self.CMP, self.AND, + self.OR, self.XOR] + # commands = [] + + # with open(sys.argv[1], "r") as f: + # line = f.readlines() + # # print(line) + # for i in line: + # if i[0] == "#": + # continue + # else: + # commands.append(int(i[:8],2)) + # f.close() + + # self.load(commands) + # print(commands) + while True: + command = self.ram[self.pc] + if command in math_op: + reg_a = self.ram[self.pc + 1] + reg_b = self.ram[self.pc + 2] + self.alu(command, reg_a, reg_b) + self.pc += 3 + elif command == self.NOT: + reg_a = self.ram[self.pc + 1] + a_value = self.reg[reg_a] + self.reg[reg_a] = ~a_value + self.pc += 2 + elif command == self.LDI: + num = self.ram[self.pc + 2] + ir = self.ram[self.pc + 1] + self.reg[ir] = num + self.pc += 3 + elif command == self.PRN: + # Print the value in a register + ir = self.ram[self.pc + 1] + print(self.reg[ir]) + self.pc += 2 + elif command == self.PUSH: + + self.reg[self.SP] -= 1 + ir = self.ram[self.pc + 1] + reg_val = self.reg[ir] + self.ram[self.reg[self.SP]] = reg_val + + self.pc += 2 + + elif command == self.POP: + ram_value = self.ram[self.reg[self.SP]] + ir = self.ram[self.pc + 1] + self.reg[ir] = ram_value + self.reg[self.SP] += 1 + + self.pc += 2 + + elif command == self.CALL: + return_address = self.pc + 2 + self.reg[self.SP] -= 1 + self.ram[self.reg[self.SP]] = return_address + + reg_num = self.ram[self.pc + 1] + self.pc = self.reg[reg_num] + + elif command == self.RET: + self.pc = self.ram[self.reg[self.SP]] + self.reg[self.SP] += 1 + + elif command == self.JMP: + reg_num = self.ram[self.pc + 1] + reg_address = self.reg[reg_num] + + self.pc = reg_address + + elif command == self.JEQ: + if self.flag == 0b00000001: + reg_num = self.ram[self.pc + 1] + reg_address = self.reg[reg_num] + + self.pc = reg_address + else: + self.pc += 2 + + elif command == self.JNE: + if self.flag != 0b00000001: + reg_num = self.ram[self.pc + 1] + reg_address = self.reg[reg_num] + + self.pc = reg_address + else: + self.pc += 2 + + elif command == self.ST: + reg_b_address = self.ram[self.pc + 2] + b_value = self.reg[reg_b_address] + reg_a_address = self.ram[self.pc + 1] + address_in_a = self.reg[reg_a_address] + self.reg[address_in_a] = b_value + + self.pc += 3 + + elif command == self.PRA: + reg_a = self.ram_read(self.pc + 1) + self.pra(reg_a) + + self.pc += 2 + + elif command == self.IRET: + self.mine_room = ''.join(self.mine_room) + print(self.mine_room) + return self.mine_room + + elif command == self.HLT: + sys.exit(0) + else: + print(f"I did not understand that command: {command}") + sys.exit(1) + diff --git a/move_sell_pray/graph.py b/move_sell_pray/graph.py new file mode 100644 index 00000000..d990825f --- /dev/null +++ b/move_sell_pray/graph.py @@ -0,0 +1,378 @@ +""" +Simple graph implementation +""" +from util import Stack, Queue # These may come in handy + +class Graph: + + """Represent a graph as a dictionary of vertices mapping labels to edges.""" + def __init__(self): + self.vertices = {} + + def add_vertex(self, vertex_id): + """ + Add a vertex to the graph. + """ + if vertex_id in self.vertices: + print("Vertex_id already exists") + else: + self.vertices[vertex_id] = set() + + def add_edge(self, v1, v2): + """ + Add a directed edge to the graph. + """ + for i in v2: + # print(i) + # print(v2) + if v1 in self.vertices and v2[i] in self.vertices: + return self.vertices[v1].add(v2[i]) + else: + raise IndexError("Index does not exist") + + def get_neighbors(self, vertex_id): + """ + Get all neighbors (edges) of a vertex. + """ + # print(f'{11} {vertex_id}') + if vertex_id in self.vertices: + # print(f'{22} {vertex_id}') + return self.vertices[vertex_id] + else: + # print(f'{33} {vertex_id}') + raise IndexError("Index does not exist") + + def bft(self, starting_vertex): + """ + Print each vertex in breadth-first order + beginning from starting_vertex. + """ + q = Queue() + q.enqueue(starting_vertex) + bft_visited_set = set() + while q.size() > 0: + number = q.dequeue() + + if number not in bft_visited_set: + bft_visited_set.add(number) + + neighbors = self.get_neighbors(number) + for n in neighbors: + q.enqueue(n) + + return bft_visited_set + + + def dft(self, starting_vertex): + """ + Print each vertex in depth-first order + beginning from starting_vertex. + """ + s = Stack() + s.push(starting_vertex) + dft_visited_set = set() + while s.size() > 0: + number = s.pop() + + if number not in dft_visited_set: + dft_visited_set.add(number) + + neighbors = self.get_neighbors(number) + for n in neighbors: + s.push(n) + + return dft_visited_set + + def dft_recursive(self, starting_vertex, dft_visited_set = None): + """ + Print each vertex in depth-first order + beginning from starting_vertex. + + This should be done using recursion. + """ + # Check if the node is visited + if dft_visited_set is None: + dft_visited_set = set() + # Hint: https://docs.python-guide.org/writing/gotchas/ + # If not... + # if starting_vertex not in visited: + # # Mark it as visited + # visited.add(starting_vertex) + # # Print + # print(starting_vertex) + # # Call DFT_Recursive on each neighbor + # for neighbor in self.get_neighbors(starting_vertex): + + + + + # dft_visited_set = self.dft_recursive(number) + # return dft_visited_set + + + + if starting_vertex not in dft_visited_set: + dft_visited_set.add(starting_vertex) + # print(f"dft_visited_set 1: {dft_visited_set}") + neighbors = self.get_neighbors(starting_vertex) + # print(f"get_neighbors 1: {neighbors}") + # number = s.pop() + for n in neighbors: + self.dft_recursive(n, dft_visited_set) + + + + + + # print(f"number 1: {number}") + # if number not in dft_visited_set: + # dft_visited_set.add(number) + # print(f"dft_visited_set 1: {dft_visited_set}") + # neighbors = self.get_neighbors(number) + # print(f"get_neighbors 1: {neighbors}") + # for n in neighbors: + # dft_recursive(s.push(n).pop()) + # print(f"dft_visited_set 2: {dft_visited_set}") + # print(f"n: {n}") + + # s.push(starting_vertex) + # # return s.pop() + # # print(f"dft_visited_set 2: {dft_visited_set}") + # # dft_visited_set = dft_recursive(self, 1) + # print(f"dft_visited_set 3: {dft_visited_set}") + # while s.size() > 0: + # number = s.pop() + + # if number not in dft_visited_set: + # dft_visited_set.add(number) + + # neighbors = self.get_neighbors(number) + # for n in neighbors: + # s.push(n) + + # return dft_visited_set + + def bfs(self, starting_vertex, destination_vertex): + """ + Return a list containing the shortest path from + starting_vertex to destination_vertex in + breath-first order. + """ + # Create an empty queue + # Add A PATH TO the starting vertex_id to the queue + # Create an empty set to store visited nodes + # While the queue is not empty... + # Dequeue, the first PATH + # GRAB THE LAST VERTEX FROM THE PATH + # CHECK IF IT'S THE TARGET + # IF SO, RETURN THE PATH + # Check if it's been visited + # If it has not been visited... + # Mark it as visited + # Then add A PATH TO all neighbors to the back of the queue + # (Make a copy of the path before adding) + q = Queue() + listy = [starting_vertex] + q.enqueue(listy) + bfs_visited_set = set() + + while q.size() > 0: + + number = q.dequeue() + if number[-1] == destination_vertex: + # bfs_visited_set.add(number) + return number + if number[-1] not in bfs_visited_set: + neighbors = self.get_neighbors(number[-1]) + bfs_visited_set.add(number[-1]) + + for n in neighbors: + temp_listy = number.copy() + temp_listy.append(n) + q.enqueue(temp_listy) + + # return bfs_visited_set + + # q = Queue() + # q.enqueue([starting_vertex]) + # bfs_visited_set = set() + + # while q.size() > 0: + # print(0) + # number = q.dequeue() + # print(number) + # if destination_vertex == number[-1]: + # # bfs_visited_set.add(number[-1]) + # return number + # last_number = number[-1] + # if last_number not in bfs_visited_set: + # bfs_visited_set.add(last_number) + # for n in number: + # neighbors = self.get_neighbors(n) + + # temp_list = [] + # for i in neighbors: + # temp_list.append(i) + # q.enqueue(temp_list) + + + def dfs(self, starting_vertex, destination_vertex): + """ + Return a list containing a path from + starting_vertex to destination_vertex in + depth-first order. + """ + # s.push(starting_vertex) + # dft_visited_set = set() + # while s.size() > 0: + # number = s.pop() + + # if number not in dft_visited_set: + # dft_visited_set.add(number) + + # neighbors = self.get_neighbors(number) + # for n in neighbors: + # s.push(n) + + # return dft_visited_set + + + s = Stack() + listy = [starting_vertex] + s.push(listy) + bfs_visited_set = set() + + while s.size() > 0: + + number = s.pop() + if number[-1] == destination_vertex: + # bfs_visited_set.add(number) + return number + + if number[-1] not in bfs_visited_set: + neighbors = self.get_neighbors(number[-1]) + bfs_visited_set.add(number[-1]) + + for n in neighbors: + temp_listy = number.copy() + temp_listy.append(n) + s.push(temp_listy) + + def dfs_recursive(self, starting_vertex, destination_vertex, dfs_visited_set=None, path=None): + """ + Return a list containing a path from + starting_vertex to destination_vertex in + depth-first order. + + This should be done using recursion. + """ + if dfs_visited_set is None: + dfs_visited_set = set() + + if path is None: + path = [] + print(starting_vertex, destination_vertex) + + + if starting_vertex not in dfs_visited_set: + dfs_visited_set.add(starting_vertex) + path_copy = path.copy() + path_copy.append(starting_vertex) + + + if starting_vertex == destination_vertex: + return path_copy + neighbors = self.get_neighbors(starting_vertex) + for n in neighbors: + pathy = self.dfs_recursive(n, destination_vertex, dfs_visited_set, path_copy) + + if pathy is not None: + return pathy + + # initialize visited if it's not yet initialized + # initialize path if it's not yet initialized + # Check if starting vertex has been visited + # If not... + # if starting_vertex not in visited: + # # Mark it as visited, add it to the path + # visited.add(starting_vertex) + # path_copy = path.copy() + # path_copy.append(starting_vertex) + # # If starting_vertex is destination: + # if starting_vertex == destination_vertex: + # return path_copy + # # Call DFS recursive on each neighbor + # for neighbor in self.get_neighbors(starting_vertex): + # new_path = self.dfs_recursive(neighbor, destination_vertex, visited, path_copy) + # if new_path is not None: + + +if __name__ == '__main__': + graph = Graph() # Instantiate your graph + # https://github.com/LambdaSchool/Graphs/blob/master/objectives/breadth-first-search/img/bfs-visit-order.png + graph.add_vertex(1) + graph.add_vertex(2) + graph.add_vertex(3) + graph.add_vertex(4) + graph.add_vertex(5) + graph.add_vertex(6) + graph.add_vertex(7) + graph.add_edge(5, 3) + graph.add_edge(6, 3) + graph.add_edge(7, 1) + graph.add_edge(4, 7) + graph.add_edge(1, 2) + graph.add_edge(7, 6) + graph.add_edge(2, 4) + graph.add_edge(3, 5) + graph.add_edge(2, 3) + graph.add_edge(4, 6) + + ''' + Should print: + {1: {2}, 2: {3, 4}, 3: {5}, 4: {6, 7}, 5: {3}, 6: {3}, 7: {1, 6}} + ''' + print(graph.vertices) + + print(graph.get_neighbors(2), graph.get_neighbors(5)) + ''' + Valid BFT paths: + 1, 2, 3, 4, 5, 6, 7 + 1, 2, 3, 4, 5, 7, 6 + 1, 2, 3, 4, 6, 7, 5 + 1, 2, 3, 4, 6, 5, 7 + 1, 2, 3, 4, 7, 6, 5 + 1, 2, 3, 4, 7, 5, 6 + 1, 2, 4, 3, 5, 6, 7 + 1, 2, 4, 3, 5, 7, 6 + 1, 2, 4, 3, 6, 7, 5 + 1, 2, 4, 3, 6, 5, 7 + 1, 2, 4, 3, 7, 6, 5 + 1, 2, 4, 3, 7, 5, 6 + ''' + # graph.bft(1) + print(graph.bft(1)) + + ''' + Valid DFT paths: + 1, 2, 3, 5, 4, 6, 7 + 1, 2, 3, 5, 4, 7, 6 + 1, 2, 4, 7, 6, 3, 5 + 1, 2, 4, 6, 3, 5, 7 + ''' + print(graph.dft(1)) + print(graph.dft_recursive(1)) + + ''' + Valid BFS path: + [1, 2, 4, 6] + ''' + print(graph.bfs(1, 6)) + + ''' + Valid DFS paths: + [1, 2, 4, 6] + [1, 2, 4, 7, 6] + ''' + print(graph.dfs(1, 6)) + print(graph.dfs_recursive(1, 6)) diff --git a/move_sell_pray/ls8/README.md b/move_sell_pray/ls8/README.md new file mode 100644 index 00000000..afb7051f --- /dev/null +++ b/move_sell_pray/ls8/README.md @@ -0,0 +1,480 @@ +# Project: The LS-8 Emulator + +## Implementation of the LS-8 Emulator + +_Objective_: to gain a deeper understanding of how a CPU functions at a +low level. + +We're going to write an emulator for the world-famous LambdaSchool-8 computer, +otherwise known as LS-8! This is an 8-bit computer with 8-bit memory addressing, +which is about as simple as it gets. + +An 8 bit CPU is one that only has 8 wires available for addresses (specifying +where something is in memory), computations, and instructions. With 8 bits, our +CPU has a total of 256 bytes of memory and can only compute values up to 255. +The CPU could support 256 instructions, as well, but we won't need them. + +For starters, we'll execute code that stores the value 8 in a register, +then prints it out: + +``` +# print8.ls8: Print the number 8 on the screen + +10000010 # LDI R0,8 +00000000 +00001000 +01000111 # PRN R0 +00000000 +00000001 # HLT +``` + +The binary numeric value on the left in the `print8.ls8` code above is either: + +* the machine code value of the instruction (e.g. `10000010` for `LDI`), also + known as the _opcode_ + +or + +* one of the opcode's arguments (e.g. `00000000` for `R0` or `00001000` for the + value `8`), also known as the _operands_. + +This code above requires the implementation of three instructions: + +* `LDI`: load "immediate", store a value in a register, or "set this register to + this value". +* `PRN`: a pseudo-instruction that prints the numeric value stored in a + register. +* `HLT`: halt the CPU and exit the emulator. + +See [the LS-8 spec](../LS8-spec.md) for more details. + +The above program is already hardcoded into the source file `cpu.py`. To run it, +you will eventually: + +``` +python3 ls8.py +``` + +but you'll have to implement those three above instructions first! + +## Step 0: IMPORTANT: inventory what is here! + +* Make a list of files here. +* Write a short 3-10-word description of what each file does. +* Note what has been implemented, and what hasn't. +* Read this whole file. +* Skim the spec. + +## Step 1: Add the constructor to `cpu.py` + +Add list properties to the `CPU` class to hold 256 bytes of memory and 8 +general-purpose registers. + +> Hint: you can make a list of a certain number of zeros with this syntax: +> +> ```python +> x = [0] * 25 # x is a list of 25 zeroes +> ``` + +Also add properties for any internal registers you need, e.g. `PC`. + +Later on, you might do further initialization here, e.g. setting the initial +value of the stack pointer. + +## Step 2: Add RAM functions + +In `CPU`, add method `ram_read()` and `ram_write()` that access the RAM inside +the `CPU` object. + +`ram_read()` should accept the address to read and return the value stored +there. + +`raw_write()` should accept a value to write, and the address to write it to. + +> Inside the CPU, there are two internal registers used for memory operations: +> the _Memory Address Register_ (MAR) and the _Memory Data Register_ (MDR). The +> MAR contains the address that is being read or written to. The MDR contains +> the data that was read or the data to write. You don't need to add the MAR or +> MDR to your `CPU` class, but they would make handy paramter names for +> `ram_read()` and `ram_write()`, if you wanted. + +We'll make use of these helper function later. + +Later on, you might do further initialization here, e.g. setting the initial +value of the stack pointer. + +## Step 3: Implement the core of `CPU`'s `run()` method + +This is the workhorse function of the entire processor. It's the most difficult +part to write. + +It needs to read the memory address that's stored in register `PC`, and store +that result in `IR`, the _Instruction Register_. This can just be a local +variable in `run()`. + +Some instructions requires up to the next two bytes of data _after_ the `PC` in +memory to perform operations on. Sometimes the byte value is a register number, +other times it's a constant value (in the case of `LDI`). Using `ram_read()`, +read the bytes at `PC+1` and `PC+2` from RAM into variables `operand_a` and +`operand_b` in case the instruction needs them. + +Then, depending on the value of the opcode, perform the actions needed for the +instruction per the LS-8 spec. Maybe an `if-elif` cascade...? There are other +options, too. + +After running code for any particular instruction, the `PC` needs to be updated +to point to the next instruction for the next iteration of the loop in `run()`. +The number of bytes an instruction uses can be determined from the two high bits +(bits 6-7) of the instruction opcode. See the LS-8 spec for details. + +## Step 4: Implement the `HLT` instruction handler + +Add the `HLT` instruction definition to `cpu.py` so that you can refer to it by +name instead of by numeric value. + +In `run()` in your switch, exit the loop if a `HLT` instruction is encountered, +regardless of whether or not there are more lines of code in the LS-8 program +you loaded. + +We can consider `HLT` to be similar to Python's `exit()` in that we stop +whatever we are doing, wherever we are. + +## Step 5: Add the `LDI` instruction + +This instruction sets a specified register to a specified value. + +See the LS-8 spec for the details of what this instructions does and its opcode +value. + +## Step 6: Add the `PRN` instruction + +This is a very similar process to adding `LDI`, but the handler is simpler. See +the LS-8 spec. + +*At this point, you should be able to run the program and have it print `8` to +the console!* + +## Step 7: Un-hardcode the machine code + +In `cpu.py`, the LS-8 programs you've been running so far have been hardcoded +into the source. This isn't particularly user-friendly. + +Make changes to `cpu.py` and `ls8.py` so that the program can be specified on +the command line like so: + +``` +python3 ls8.py examples/mult.ls8 +``` + +(The programs `print8.ls8` and `mult.ls8` are provided in the `examples/` +directory for your convenience.) + +For processing the command line, checkout `sys.argv`. Try running the following +Python program with different arguments on the command line to see how it works: + +```python +import sys + +print(sys.argv) +``` + +Note that `sys.argv[0]` is the name of the running program itself. + +If the user runs `python3 ls8.py examples/mult.ls8`, the values in `sys.argv` +will be: + +```python +sys.argv[0] == "ls8.py" +sys.argv[1] == "examples/mult.ls8" +``` + +so you can look in `sys.argv[1]` for the name of the file to load. + +> Bonus: check to make sure the user has put a command line argument where you +> expect, and print an error and exit if they didn't. + +In `load()`, you will now want to use those command line arguments to open a +file, read in its contents line by line, and save appropriate data into RAM. + +As you process lines from the file, you should be on the lookout for blank lines +(ignore them), and you should ignore everything after a `#`, since that's a +comment. + +You'll have to convert the binary strings to integer values to store in RAM. The +built-in `int()` function can do that when you specify a number base as the +second argument: + +```python +x = int("1010101", 2) # Convert binary string to integer +``` + +## Step 8: Implement a Multiply and Print the Result + +Extend your LS8 emulator to support the following program: + +``` +# mult.ls8: Multiply 8x9 and print 72 + +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +10100010 # MUL R0,R1 +00000000 +00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT +``` + +One you run it with `python3 ls8.py examples/mult.ls8`, you should see: + +``` +72 +``` + +Check the LS-8 spec for what the `MUL` instruction does. + +> Note: `MUL` is the responsiblity of the ALU, so it would be nice if your code +> eventually called the `alu()` function with appropriate arguments to get the +> work done. + +## Step 9: Beautify your `run()` loop + +Do you have a big `if-elif` block in your `cpu_run()` function? Is there a way +to better modularize your code? There are plenty of them! + +> What is the time complexity of the `if-elif` cascade? In the worst case, we're +> going to have to check the value in `IR` against all of the possible opcode +> values. This is `O(n)`. It would be a lot better if it we an `O(1)` process... + +One option is to use something called a _branch table_ or _dispatch table_ to +simplify the instruction handler dispatch code. This is a list or dictionary of +functions that you can index by opcode value. The upshot is that you fetch the +instruction value from RAM, then use that value to look up the handler function +in the branch table. Then call it. + +Example of a branch table: + +```python +OP1 = 0b10101010 +OP2 = 0b11110000 + +class Foo: + + def __init__(self): + # Set up the branch table + self.branchtable = {} + self.branchtable[OP1] = self.handle_op1 + self.branchtable[OP2] = self.handle_op2 + + def handle_op1(self, a): + print("op 1: " + a) + + def handle_op2(self, a): + print("op 2: " + a) + + def run(self): + # Example calls into the branch table + ir = OP1 + self.branchtable[ir]("foo") + + ir = OP2 + self.branchtable[ir]("bar") + +c = Foo() +c.run() +``` + +## Step 10: Implement System Stack + +All CPUs manage a _stack_ that can be used to store information temporarily. +This stack resides in main memory and typically starts at the top of memory (at +a high address) and grows _downward_ as things are pushed on. The LS-8 is no +exception to this. + +Implement a system stack per the spec. Add `PUSH` and `POP` instructions. Read + the beginning of the spec to see which register is the stack pointer. + +* Values themselves should be saved in the ***portion of RAM*** _that is allocated for the stack_. + - Use the stack pointer to modify the correct block of memory. + - Make sure you update the stack pointer appropriately as you `PUSH` and `POP` items to and from the stack. + +If you run `python3 ls8.py examples/stack.ls8` you should see the output: + +``` +2 +4 +1 +``` + +## Step 11: Implement Subroutine Calls + +Back in the old days, functions were called _subroutines_. In machine code, +subroutines enable you to jump to any address with the `CALL` instruction, and +then return back to where you called from with the `RET` instruction. This +enables you to create reusable functions. + +Subroutines have many similarities to functions in higher-level languages. Just +as a function in C, JavaScript or Python will jump from the function call, to +its definition, and then return back to the line of code following the call, +subroutines will also allow us to execute instructions non-sequentially. + +The stack is used to hold the return address used by `RET`, so you **must** +implement the stack in step 11, first. Then, add subroutine instructions `CALL` +and `RET`. + +* For `CALL`, you will likely have to modify your handler call in `cpu_run()`. + The problem is that some instructions want to execute and move to the next + instruction like normal, but others, like `CALL` and `JMP` want to go to a + specific address. + + > Note: `CALL` is very similar to the `JMP` instruction. However, there is one + > key difference between them. Can you find it in the specs? + + * In **any** case where the instruction handler sets the `PC` directly, you + _don't_ want to advance the PC to the next instruction. So you'll have to + set up a special case for those types of instructions. This can be a flag + you explicitly set per-instruction... but can also be computed from the + value in `IR`. Check out the spec for more. + +If you run `python3 ls8.py examples/call.ls8` you should see the output: + +``` +20 +30 +36 +60 +``` + +## Stretch Goal: Timer Interrupts + +Add interrupts to the LS-8 emulator. + +**You must have implemented a CPU stack before doing this.** + +**You must have implmented the `ST` instruction before doing this.** + +See the [LS-8 +spec](https://github.com/LambdaSchool/Computer-Architecture-One/blob/master/LS8-SPEC.md) +for details on implementation. + +The LS-8 should fire a timer interrupt one time per second. This could be +implemented by calling `datetime.now()` (in the `datetime` module) each +iteration of the main loop and checking to see if one second has elapsed. + +When the timer is ready to fire, set bit 0 of the IS register (R6). + +Later in the main instruction loop, you'll check to see if bit 0 of the +IS register is set, and if it is, you'll push the registers on the +stack, look up the interrupt handler address in the interrupt vector +table at address `0xF8`, and set the PC to it. Execution continues in +the interrupt handler. + +Then when an `IRET` instruction is found, the registers and PC are +popped off the stack and execution continues normally. + +## Example + +This code prints out the letter `A` from the timer interrupt handler +that fires once per second. + +``` +# interrupts.ls8 + +10000010 # LDI R0,0XF8 +00000000 +11111000 +10000010 # LDI R1,INTHANDLER +00000001 +00010001 +10000100 # ST R0,R1 +00000000 +00000001 +10000010 # LDI R5,1 +00000101 +00000001 +10000010 # LDI R0,LOOP +00000000 +00001111 + +# LOOP (address 15): +01010100 # JMP R0 +00000000 + +# Timer interrupt Handler +# When the timer interrupt occurs, output an 'A' +# INTHANDLER (address 17): +10000010 # LDI R0,65 +00000000 +01000001 +01001000 # PRA R0 +00000000 +00010011 # IRET +``` + +The assembly program is interested in getting timer interrupts, so it sets the +IM register to `00000001` with `LDI R5,1`. + +The interrupt timer gets to 1 second, and sets bit #0 in IS. + +At the beginning of each `cpu_run()` loop, the CPU checks to see if interrupts +are enabled. If not, it continues processing instructions as normal. Otherwise: + +Bitwise-AND the IM register with the IS register. This masks out all the +interrupts we're not interested in, leaving the ones we are interested in: + +```python +masked_interrupts = cpu.reg[IM] & cpu.reg[IS] +``` + +Step through each bit of `masked_interrupts` and see which interrupts are set. + +```python +for i in range(8): + # Right shift interrupts down by i, then mask with 1 to see if that bit was set + interrupt_happened = ((masked_interrupts >> i) & 1) == 1 + + # ... +``` + +(If the no interrupt bits are set, then stop processing interrupts and continue +executing the current instruction as per usual.) + +If `interrupt_happened`, check the LS-8 spec for details on what to do. + +## Stretch Goal: Keyboard Interrupts + +This gets tricky because you have to see if a key has been pressed without +stopping the program from running otherwise. The easiest way to do this is with +_polling_. ("Was a key hit? What about now? What about now?") + +Google for `python keyboard poll` to get some ideas on how to do this. Windows +does it differently than Unix/Mac. + +## Stretch Goal: Curve Histogram + +Write an LS-8 assembly program that prints this curve on the screen: + +``` +* +** +**** +******** +**************** +******************************** +**************************************************************** +``` + +Each subsequent line has two-times the number of asterisks as the previous line. + +**Use loops to get this done.** + +Doing this correctly requires implementing `CMP`, and some comparative forms of +`JMP`, such as `JLT` or `JNE` or `JEQ`. + +Hint: Look in the `asm/` directory and learn how to use the `asm.js` assembler. +This way you can write your code in assembly language and use the assembler to +build it to machine code and then run it on your emulator. diff --git a/move_sell_pray/ls8/__init__.py b/move_sell_pray/ls8/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/move_sell_pray/ls8/__pycache__/cpu.cpython-37.pyc b/move_sell_pray/ls8/__pycache__/cpu.cpython-37.pyc new file mode 100644 index 00000000..6516a688 Binary files /dev/null and b/move_sell_pray/ls8/__pycache__/cpu.cpython-37.pyc differ diff --git a/move_sell_pray/ls8/examples/and.ls8 b/move_sell_pray/ls8/examples/and.ls8 new file mode 100644 index 00000000..5e61176e --- /dev/null +++ b/move_sell_pray/ls8/examples/and.ls8 @@ -0,0 +1,12 @@ +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +10101000 # AND R0,R1 +00000000 +00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT \ No newline at end of file diff --git a/move_sell_pray/ls8/examples/call.ls8 b/move_sell_pray/ls8/examples/call.ls8 new file mode 100644 index 00000000..71f4dbe7 --- /dev/null +++ b/move_sell_pray/ls8/examples/call.ls8 @@ -0,0 +1,31 @@ +10000010 # LDI R1,MULT2PRINT +00000001 +00011000 +10000010 # LDI R0,10 +00000000 +00001010 +01010000 # CALL R1 +00000001 +10000010 # LDI R0,15 +00000000 +00001111 +01010000 # CALL R1 +00000001 +10000010 # LDI R0,18 +00000000 +00010010 +01010000 # CALL R1 +00000001 +10000010 # LDI R0,30 +00000000 +00011110 +01010000 # CALL R1 +00000001 +00000001 # HLT +# MULT2PRINT (address 24): +10100000 # ADD R0,R0 +00000000 +00000000 +01000111 # PRN R0 +00000000 +00010001 # RET diff --git a/move_sell_pray/ls8/examples/interrupts.ls8 b/move_sell_pray/ls8/examples/interrupts.ls8 new file mode 100644 index 00000000..12bd95d8 --- /dev/null +++ b/move_sell_pray/ls8/examples/interrupts.ls8 @@ -0,0 +1,25 @@ +10000010 # LDI R0,0XF8 +00000000 +11111000 +10000010 # LDI R1,INTHANDLER +00000001 +00010001 +10000100 # ST R0,R1 +00000000 +00000001 +10000010 # LDI R5,1 +00000101 +00000001 +10000010 # LDI R0,LOOP +00000000 +00001111 +# LOOP (address 15): +01010100 # JMP R0 +00000000 +# INTHANDLER (address 17): +10000010 # LDI R0,65 +00000000 +01000001 +01001000 # PRA R0 +00000000 +00010011 # IRET diff --git a/move_sell_pray/ls8/examples/keyboard.ls8 b/move_sell_pray/ls8/examples/keyboard.ls8 new file mode 100644 index 00000000..fb10eecb --- /dev/null +++ b/move_sell_pray/ls8/examples/keyboard.ls8 @@ -0,0 +1,28 @@ +10000010 # LDI R0,0XF9 +00000000 +11111001 +10000010 # LDI R1,INTHANDLER +00000001 +00010001 +10000100 # ST R0,R1 +00000000 +00000001 +10000010 # LDI R5,2 +00000101 +00000010 +10000010 # LDI R0,LOOP +00000000 +00001111 +# LOOP (address 15): +01010100 # JMP R0 +00000000 +# INTHANDLER (address 17): +10000010 # LDI R0,0XF4 +00000000 +11110100 +10000011 # LD R1,R0 +00000001 +00000000 +01001000 # PRA R1 +00000001 +00010011 # IRET diff --git a/move_sell_pray/ls8/examples/mult.ls8 b/move_sell_pray/ls8/examples/mult.ls8 new file mode 100644 index 00000000..c75dac2a --- /dev/null +++ b/move_sell_pray/ls8/examples/mult.ls8 @@ -0,0 +1,12 @@ +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +10100010 # MUL R0,R1 +00000000 +00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT diff --git a/move_sell_pray/ls8/examples/not.ls8 b/move_sell_pray/ls8/examples/not.ls8 new file mode 100644 index 00000000..7ae0fb52 --- /dev/null +++ b/move_sell_pray/ls8/examples/not.ls8 @@ -0,0 +1,12 @@ +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +01101001 # XOR R0,R1 +00000000 +# 00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT \ No newline at end of file diff --git a/move_sell_pray/ls8/examples/or.ls8 b/move_sell_pray/ls8/examples/or.ls8 new file mode 100644 index 00000000..f3d2ab31 --- /dev/null +++ b/move_sell_pray/ls8/examples/or.ls8 @@ -0,0 +1,12 @@ +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +10101010 # OR R0,R1 +00000000 +00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT \ No newline at end of file diff --git a/move_sell_pray/ls8/examples/print8.ls8 b/move_sell_pray/ls8/examples/print8.ls8 new file mode 100644 index 00000000..e3b3457c --- /dev/null +++ b/move_sell_pray/ls8/examples/print8.ls8 @@ -0,0 +1,11 @@ +# Print the number 8 + +# This comment and blank line is here to make sure +# they are handled correctly by the file reading code. + +10000010 # LDI R0,8 +00000000 +00001000 +01000111 # PRN R0 +00000000 +00000001 # HLT diff --git a/move_sell_pray/ls8/examples/printstr.ls8 b/move_sell_pray/ls8/examples/printstr.ls8 new file mode 100644 index 00000000..c69cc778 --- /dev/null +++ b/move_sell_pray/ls8/examples/printstr.ls8 @@ -0,0 +1,56 @@ +10000010 # LDI R0,HELLO +00000000 +00100110 +10000010 # LDI R1,14 +00000001 +00001110 +10000010 # LDI R2,PRINTSTR +00000010 +00001100 +01010000 # CALL R2 +00000010 +00000001 # HLT +# PRINTSTR (address 12): +10000010 # LDI R2,0 +00000010 +00000000 +# PRINTSTRLOOP (address 15): +10100111 # CMP R1,R2 +00000001 +00000010 +10000010 # LDI R3,PRINTSTREND +00000011 +00100101 +01010101 # JEQ R3 +00000011 +10000011 # LD R3,R0 +00000011 +00000000 +01001000 # PRA R3 +00000011 +01100101 # INC R0 +00000000 +01100110 # DEC R1 +00000001 +10000010 # LDI R3,PRINTSTRLOOP +00000011 +00001111 +01010100 # JMP R3 +00000011 +# PRINTSTREND (address 37): +00010001 # RET +# HELLO (address 38): +01001000 # H +01100101 # e +01101100 # l +01101100 # l +01101111 # o +00101100 # , +00100000 # [space] +01110111 # w +01101111 # o +01110010 # r +01101100 # l +01100100 # d +00100001 # ! +00001010 # 0x0a diff --git a/move_sell_pray/ls8/examples/sctest.ls8 b/move_sell_pray/ls8/examples/sctest.ls8 new file mode 100644 index 00000000..7853b76a --- /dev/null +++ b/move_sell_pray/ls8/examples/sctest.ls8 @@ -0,0 +1,79 @@ +10000010 # LDI R0,10 +00000000 +00001010 +10000010 # LDI R1,20 +00000001 +00010100 +10000010 # LDI R2,TEST1 +00000010 +00010011 +10100111 # CMP R0,R1 +00000000 +00000001 +01010101 # JEQ R2 +00000010 +10000010 # LDI R3,1 +00000011 +00000001 +01000111 # PRN R3 +00000011 +# TEST1 (address 19): +10000010 # LDI R2,TEST2 +00000010 +00100000 +10100111 # CMP R0,R1 +00000000 +00000001 +01010110 # JNE R2 +00000010 +10000010 # LDI R3,2 +00000011 +00000010 +01000111 # PRN R3 +00000011 +# TEST2 (address 32): +10000010 # LDI R1,10 +00000001 +00001010 +10000010 # LDI R2,TEST3 +00000010 +00110000 +10100111 # CMP R0,R1 +00000000 +00000001 +01010101 # JEQ R2 +00000010 +10000010 # LDI R3,3 +00000011 +00000011 +01000111 # PRN R3 +00000011 +# TEST3 (address 48): +10000010 # LDI R2,TEST4 +00000010 +00111101 +10100111 # CMP R0,R1 +00000000 +00000001 +01010110 # JNE R2 +00000010 +10000010 # LDI R3,4 +00000011 +00000100 +01000111 # PRN R3 +00000011 +# TEST4 (address 61): +10000010 # LDI R3,5 +00000011 +00000101 +01000111 # PRN R3 +00000011 +10000010 # LDI R2,TEST5 +00000010 +01001001 +01010100 # JMP R2 +00000010 +01000111 # PRN R3 +00000011 +# TEST5 (address 73): +00000001 # HLT diff --git a/move_sell_pray/ls8/examples/stack.ls8 b/move_sell_pray/ls8/examples/stack.ls8 new file mode 100644 index 00000000..e7c6e668 --- /dev/null +++ b/move_sell_pray/ls8/examples/stack.ls8 @@ -0,0 +1,31 @@ +10000010 # LDI R0,1 +00000000 +00000001 +10000010 # LDI R1,2 +00000001 +00000010 +01000101 # PUSH R0 +00000000 +01000101 # PUSH R1 +00000001 +10000010 # LDI R0,3 +00000000 +00000011 +01000110 # POP R0 +00000000 +01000111 # PRN R0 +00000000 +10000010 # LDI R0,4 +00000000 +00000100 +01000101 # PUSH R0 +00000000 +01000110 # POP R2 +00000010 +01000110 # POP R1 +00000001 +01000111 # PRN R2 +00000010 +01000111 # PRN R1 +00000001 +00000001 # HLT diff --git a/move_sell_pray/ls8/examples/stackoverflow.ls8 b/move_sell_pray/ls8/examples/stackoverflow.ls8 new file mode 100644 index 00000000..cec5f50f --- /dev/null +++ b/move_sell_pray/ls8/examples/stackoverflow.ls8 @@ -0,0 +1,19 @@ +10000010 # LDI R0,0 +00000000 +00000000 +10000010 # LDI R1,1 +00000001 +00000001 +10000010 # LDI R3,LOOP +00000011 +00001001 +# LOOP (address 9): +01000111 # PRN R0 +00000000 +10100000 # ADD R0,R1 +00000000 +00000001 +01000101 # PUSH R0 +00000000 +01010100 # JMP R3 +00000011 diff --git a/move_sell_pray/ls8/examples/xor.ls8 b/move_sell_pray/ls8/examples/xor.ls8 new file mode 100644 index 00000000..b7404db7 --- /dev/null +++ b/move_sell_pray/ls8/examples/xor.ls8 @@ -0,0 +1,12 @@ +10000010 # LDI R0,8 +00000000 +00001000 +10000010 # LDI R1,9 +00000001 +00001001 +10101011 # AND R0,R1 +00000000 +00000001 +01000111 # PRN R0 +00000000 +00000001 # HLT \ No newline at end of file diff --git a/move_sell_pray/ls8/ls8.py b/move_sell_pray/ls8/ls8.py new file mode 100644 index 00000000..fed38e09 --- /dev/null +++ b/move_sell_pray/ls8/ls8.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +"""Main.""" + +import sys +from cpu import * + +cpu = CPU() + +# print(cpu.load()) +# print(cpu.trace()) +cpu.run() \ No newline at end of file diff --git a/move_sell_pray/ls8/simple.py b/move_sell_pray/ls8/simple.py new file mode 100644 index 00000000..a01ad9ca --- /dev/null +++ b/move_sell_pray/ls8/simple.py @@ -0,0 +1,62 @@ +import sys +​ +PRINT_BEEJ = 1 +HALT = 2 +PRINT_NUM = 3 +SAVE = 4 # Save a value to a register +PRINT_REGISTER = 5 # Print the value in a register +ADD = 6 # ADD 2 registers, store the result in 1st reg +​ +​ +memory = [ + PRINT_BEEJ, + SAVE, # SAVE 65 in R2 + 65, + 2, + SAVE, # SAVE 20 in R3 + 20, + 3, + ADD, # R2 += R3 + 2, + 3, + PRINT_REGISTER, # PRINT R2 (85) + 2, + HALT +] +​ +register = [0] * 8 +​ +pc = 0 # Program counter +​ +while True: + command = memory[pc] +​ + if command == PRINT_BEEJ: + print("Beej!") + pc += 1 + elif command == PRINT_NUM: + num = memory[pc + 1] + print(num) + pc += 2 + elif command == SAVE: + # Save a value to a register + num = memory[pc + 1] + reg = memory[pc + 2] + register[reg] = num + pc += 3 + elif command == PRINT_REGISTER: + # Print the value in a register + reg = memory[pc + 1] + print(register[reg]) + pc += 2 + elif command == ADD: + # ADD 2 registers, store the result in 1st reg + reg_a = memory[pc + 1] + reg_b = memory[pc + 2] + register[reg_a] += register[reg_b] + pc += 3 + elif command == HALT: + sys.exit(0) + else: + print(f"I did not understand that command: {command}") + sys.exit(1) \ No newline at end of file diff --git a/move_sell_pray/ls8/sys.argv[1] b/move_sell_pray/ls8/sys.argv[1] new file mode 100644 index 00000000..e69de29b diff --git a/move_sell_pray/mine.py b/move_sell_pray/mine.py new file mode 100644 index 00000000..c24d87f0 --- /dev/null +++ b/move_sell_pray/mine.py @@ -0,0 +1,60 @@ +import requests +import hashlib +import json +# from time import time +from uuid import uuid4 +import math +import random +import time + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + +def proof_of_work(headers): + """ + Simple Proof of Work Algorithm + Stringify the block and look for a proof. + Loop through possibilities, checking each one against `valid_proof` + in an effort to find a number that is a valid proof + :return: A valid proof for the provided block + """ + response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/last_proof/', headers=headers).json() + last_proof = response['proof'] + difficulty = response['difficulty'] + cooldown_func(response) + print('---'*10) + print(f"Mining coin for proof {last_proof} at difficulty {difficulty}...") + # block_string = json.dumps(block, sort_keys=True) + proof = random.randint(5000, 15000) + + while valid_proof(last_proof, proof, difficulty) is False: + proof += 1 + + # return proof + data = '{"proof":' + str(proof) + '}' + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/bc/mine/', headers=headers, data=data).json() + cooldown_func(response) + return response + +def valid_proof(last_proof, proof, difficulty): + """ + Validates the Proof: Does hash(block_string, proof) contain 6 + leading zeroes? Return true if the proof is valid + :param block_string: The stringified block to use to + check in combination with `proof` + :param proof: The value that when combined with the + stringified previous block results in a hash that has the + correct number of leading zeroes. + :return: True if the resulting hash is a valid proof, False otherwise + """ + guess = str(last_proof) + str(proof) + guess_encoded = guess.encode() + guess_hash = hashlib.sha256(guess_encoded).hexdigest() + + if guess_hash[:difficulty] == '0' * difficulty: + return True + return False \ No newline at end of file diff --git a/move_sell_pray/mov2.py b/move_sell_pray/mov2.py new file mode 100644 index 00000000..b63e1084 --- /dev/null +++ b/move_sell_pray/mov2.py @@ -0,0 +1,676 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [0,0,0] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in isnventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate +shrined = [ 1,0,0] +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + else: + continue + # traversal_path = g.bfs(curr_id, sh) + + dash_fly(curr_id, sh) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = response_shrine['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_mine(curr_id, wishing_well=55, alternative=False): + if alternative == False: + new_room_id = dash_fly(curr_id, wishing_well) + else: + pass + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + mine_room = ls8.run() + mine_room = int(mine_room.replace(" ","")) + print('=================== Going to mine ===================') + mine_room = dash_fly(new_room_id, mine_room) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + cooldown_func(mine_response) + print('================ Mined new coin ===============') + print(mine_response) + + return mine_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + transmogrifier_room = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + + + # if "{}" not in response_examin['attributes']: + + # transmogrifier_data = '{"name":"'+i+'"}' + # transmogrifier_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/transmogrify/', + # headers=headers, data=transmogrifier_data).json() + # print(f'Item {i}\n') + # sold = True + # print(transmogrifier_response) + # cooldown_func(transmogrifier_response) + + # n += 1 + # print(n) + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # for i in inventory: + # print(f'item: {i}') + # while True: + # print(inventory) + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["examine", "wear", "undress","choose"]: + # # player.travel(cmds[0], True) + # if cmds[0] == 'choose': + # i = cmds[1] + # data = '{"name":"[' + str(i) +']"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + # print(take_examin) + # elif cmds[0] == "q": + # break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + print(response) + # while True: + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["n", "s", "e", "w"]: + # # player.travel(cmds[0], True) + # data = '{"direction":"' + str(cmds[0]) +'"}' + + # next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + # headers=headers, data=data).json() + # cooldown_func(next_room) + # print(next_room) + # elif cmds[0] in ["examine", "take"]: + # if len(cmds[1:]) > 1: + # t = cmds[1] + " " +cmds[2] + # else: + # t = cmds[1] + + # data = '{"name":"' + str(t) +'"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + + # print(take_examin) + + # elif cmds[0] == "mine": + + # message = proof_of_work(headers) + # print(f'Mining message: {message}') + # mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + # headers=headers).json() + + # print('================ Mined new coin ===============') + # print(mine_response) + # cooldown_func(mine_response) + + # elif cmds[0] == 'pray': + # data_items = '{"name":"Wishing Well"}' + # response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + # headers=headers, data=data_items).json() + # well_desc = response_examin['description'].split('\n') + # print(f'well_desc: {well_desc}') + # # code = response['description'] + # filename = 'wishing_well.txt' + # well_desc.pop() + # well_desc.append('00010011') + # with open(filename, 'w') as f: + # for line in well_desc[2:]: + # f.write(line) + # f.write('\n') + # print('=================== DECODING MESSAGE ====================') + # ls8 = CPU() + # ls8.load(filename) + # mine_room = ls8.run() + # mine_room = int(mine_room.replace(" ","")) + # print(mine_room) + + # elif cmds[0] == "q": + # break + +wrapped = False +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + if ((strength - encumbrance) <= 2 | (encumbrance == strength)) & (name == 'User 20677'): + print('=========Going to the shop===========\n') + + sold, curr_id = go_to_shop(curr_id, inventory, shop=1, come_back=False) + if sold == True: + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # curr_id = go_to_transmogrifier(curr_id) + print(f'Encumbrance and stength: {encumbrance}, {strength}') + # Change Name + if (gold >= 1000) & (name == 'User 20677'): + print('=========Going to the see pirate Ry===========\n') + curr_id = go_to_pirate(curr_id) + # Pray + elif ('pray' in abilities) & (len(abilities) != 6): + print('==============Going to Pray================') + curr_id = go_to_shrine(curr_id) + # Wishing Well + # if len(abilities) == 5 & ((armor == None) | (shoes == None)): + # print('=============== lets wish and mine =============') + # new_id = go_to_wishing_well_mine(curr_id) + elif wrapped == True: + print('=============== lets wish and mine =============') + new_id = go_to_wishing_well_mine(curr_id) + + + # Wear stuff + elif ((armor == None) | (shoes == None)): + curr_id = go_to_transmogrifier(curr_id) + + elif wrapped == True: + warp() + wrapped = True + + elif ('pray' in abilities) & (len(abilities) != 6): + print('==============Going to Pray================') + curr_id = go_to_shrine(curr_id) + + + + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + + if (len(next_room['items']) > 0): + weights = [] + + for i in next_room['items']: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + + # if (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(response_wear) + # print(f'Wore item: {i}\n') + # # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # print(f'Armore: {armor}, Shoes: {shoes}') + if "{}" not in response_examin['attributes']: + if (encumbrance + response_examin['weight']) < strength: + name_item = i + + data_items = '{"name":"' + name_item + '"}' + + response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data_items).json() + print('Picked up item\n') + cooldown_func(response_items) + encumbrance += response_examin['weight'] + inventory.append(name_item) + # elif (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(f'Wore item: {i}\n') + # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + # if (encumbrance == strength) | (strength - encumbrance) == 1: + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while moving: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/new_path.py b/move_sell_pray/new_path.py new file mode 100644 index 00000000..4d1d1ef7 --- /dev/null +++ b/move_sell_pray/new_path.py @@ -0,0 +1,6 @@ +my_dict = {143: {'e': 212, 'w': 121}, 121: {'n': 128, 'e': 143, 'w': 107}, 107: {'s': 120, 'e': 121, 'w': 104}, 120: {'n': 107, 'e': 127}, 127: {'e': 184, 'w': 120}, 184: {'e': 221, 'w': 127}, 221: {'s': 253, 'e': 240, 'w': 184}, 253: {'n': 221, 'e': 258}, 258: {'e': 306, 'w': 253}, 306: {'e': 397, 'w': 258}, 397: {'w': 306}, 240: {'n': 249, 'e': 386, 'w': 221}, 249: {'n': 265, 's': 240, 'e': 282}, 282: {'w': 249}, 265: {'n': 279, 's': 249, 'e': 270}, 279: {'s': 265}, 270: {'n': 416, 'e': 338, 'w': 265}, 338: {'s': 379, 'w': 270}, 379: {'n': 338, 'e': 395}, 395: {'s': 403, 'e': 421, 'w': 379}, 403: {'n': 395}, 421: {'n': 440, 'w': 395}, 440: {'s': 421, 'w': 476}, 476: {'e': 440}, 416: {'s': 270}, 386: {'e': 414, 'w': 240}, 414: {'w': 386}, 104: {'n': 59, 'e': 107}, 59: {'n': 38, 's': 104, 'e': 92}, 38: {'s': 59, 'e': 66, 'w': 33}, 66: {'n': 169, 'e': 123, 'w': 38}, 123: {'w': 66}, 169: {'s': 66, 'e': 186}, 186: {'e': 205, 'w': 169}, 205: {'s': 241, 'e': 479, 'w': 186}, 479: {'w': 205}, 241: {'n': 205, 'e': 266}, 266: {'w': 241}, 33: {'e': 38, 'w': 31}, 31: {'n': 30, 'e': 33}, 30: {'s': 31, 'e': 32, 'w': 27}, 32: {'n': 39, 'e': 54, 'w': 30}, 39: {'n': 53, 's': 32, 'e': 51, 'w': 41}, 41: {'e': 39}, 51: {'n': 69, 'e': 57, 'w': 39}, 57: {'e': 145, 'w': 51}, 145: {'n': 174, 'e': 220, 'w': 57}, 220: {'w': 145}, 174: {'n': 192, 's': 145, 'e': 224}, 224: {'w': 174}, 192: {'n': 201, 's': 174, 'e': 223}, 223: {'n': 283, 'w': 192}, 283: {'n': 331, 's': 223, 'e': 313}, 313: {'w': 283}, 331: {'s': 283, 'e': 446}, 446: {'e': 466, 'w': 331}, 466: {'s': 486, 'e': 472, 'w': 446}, 486: {'n': 466}, 472: {'w': 466}, 201: {'s': 192}, 69: {'n': 94, 's': 51, 'e': 103}, 94: {'n': 152, 's': 69}, 152: {'s': 94}, 103: {'n': 160, 'w': 69}, 160: {'s': 103}, 53: {'n': 95, 's': 39, 'w': 88}, 88: {'e': 53, 'w': 122}, 122: {'n': 124, 'e': 88}, 124: {'n': 157, 's': 122}, 157: {'n': 210, 's': 124, 'w': 182}, 182: {'e': 157, 'w': 208}, 208: {'e': 182}, 210: {'s': 157}, 95: {'n': 119, 's': 53, 'w': 115}, 119: {'n': 134, 's': 95}, 134: {'n': 147, 's': 119, 'e': 144}, 144: {'e': 155, 'w': 134}, 155: {'s': 187, 'e': 316, 'w': 144}, 187: {'n': 155}, 316: {'n': 344, 'w': 155}, 344: {'n': 392, 's': 316, 'e': 390}, 392: {'s': 344, 'e': 462}, 462: {'w': 392}, 390: {'w': 344}, 147: {'n': 200, 's': 134, 'e': 153, 'w': 151}, 200: {'n': 227, 's': 147, 'e': 206}, 227: {'n': 269, 's': 200}, 269: {'n': 319, 's': 227}, 319: {'n': 359, 's': 269, 'e': 345}, 359: {'s': 319}, 345: {'s': 375, 'w': 319}, 375: {'n': 345, 'e': 385}, 385: {'w': 375}, 206: {'n': 288, 'e': 380, 'w': 200}, 380: {'n': 424, 'w': 206}, 424: {'s': 380, 'e': 473}, 473: {'e': 494, 'w': 424}, 494: {'w': 473}, 288: {'s': 206}, 151: {'n': 172, 'e': 147, 'w': 207}, 207: {'n': 231, 'e': 151, 'w': 290}, 231: {'s': 207, 'w': 248}, 248: {'n': 296, 'e': 231, 'w': 280}, 280: {'n': 325, 'e': 248}, 325: {'n': 353, 's': 280, 'w': 374}, 374: {'e': 325}, 353: {'s': 325}, 296: {'s': 248}, 290: {'e': 207}, 172: {'n': 267, 's': 151}, 267: {'n': 285, 's': 172, 'w': 271}, 271: {'n': 337, 'e': 267}, 337: {'s': 271}, 285: {'n': 286, 's': 267}, 286: {'n': 336, 's': 285, 'w': 291}, 291: {'n': 410, 'e': 286, 'w': 347}, 347: {'n': 452, 's': 442, 'e': 291}, 452: {'s': 347}, 442: {'n': 347}, 410: {'s': 291}, 336: {'s': 286}, 153: {'e': 329, 'w': 147}, 329: {'w': 153}, 115: {'n': 116, 'e': 95}, 116: {'n': 132, 's': 115}, 132: {'s': 116}, 54: {'w': 32}, 27: {'n': 40, 's': 28, 'e': 30, 'w': 20}, 28: {'n': 27}, 20: {'n': 63, 's': 19, 'e': 27, 'w': 46}, 63: {'n': 72, 's': 20, 'w': 73}, 73: {'e': 63}, 72: {'s': 63, 'w': 76}, 76: {'n': 83, 'e': 72, 'w': 110}, 83: {'s': 76, 'e': 130, 'w': 125}, 130: {'w': 83}, 125: {'n': 165, 'e': 83, 'w': 237}, 237: {'e': 125, 'w': 245}, 245: {'s': 254, 'e': 237}, 254: {'n': 245, 'w': 314}, 314: {'e': 254}, 165: {'n': 203, 's': 125, 'w': 204}, 203: {'n': 268, 's': 165, 'e': 299}, 299: {'e': 311, 'w': 203}, 311: {'w': 299}, 268: {'s': 203, 'e': 411, 'w': 312}, 411: {'w': 268}, 312: {'n': 328, 'e': 268}, 328: {'n': 332, 's': 312, 'e': 357, 'w': 363}, 332: {'n': 350, 's': 328}, 350: {'n': 436, 's': 332, 'e': 404}, 436: {'s': 350}, 404: {'n': 481, 'w': 350}, 481: {'s': 404}, 363: {'n': 372, 'e': 328}, 372: {'n': 441, 's': 363}, 441: {'s': 372}, 357: {'w': 328}, 204: {'n': 219, 'e': 165, 'w': 216}, 219: {'s': 204}, 216: {'n': 234, 'e': 204, 'w': 218}, 234: {'n': 368, 's': 216, 'w': 252}, 252: {'n': 284, 'e': 234}, 284: {'n': 302, 's': 252, 'w': 303}, 303: {'n': 361, 'e': 284, 'w': 405}, 405: {'n': 406, 'e': 303}, 406: {'s': 405, 'w': 415}, 415: {'e': 406, 'w': 418}, 418: {'n': 425, 's': 474, 'e': 415}, 474: {'n': 418}, 425: {'s': 418, 'w': 469}, 469: {'e': 425}, 361: {'n': 408, 's': 303}, 408: {'n': 458, 's': 361, 'w': 423}, 423: {'e': 408, 'w': 454}, 454: {'n': 470, 'e': 423}, 470: {'s': 454}, 458: {'s': 408, 'w': 459}, 459: {'e': 458}, 302: {'n': 422, 's': 284}, 422: {'n': 426, 's': 302}, 426: {'n': 457, 's': 422}, 457: {'n': 461, 's': 426}, 461: {'s': 457}, 368: {'s': 234}, 218: {'s': 263, 'e': 216, 'w': 242}, 242: {'n': 287, 's': 259, 'e': 218, 'w': 275}, 287: {'s': 242, 'w': 339}, 339: {'e': 287, 'w': 445}, 445: {'n': 447, 'e': 339, 'w': 450}, 450: {'e': 445}, 447: {'s': 445}, 259: {'n': 242, 'w': 310}, 310: {'e': 259, 'w': 412}, 412: {'s': 488, 'e': 310}, 488: {'n': 412}, 275: {'e': 242, 'w': 456}, 456: {'e': 275, 'w': 499}, 499: {'e': 456}, 263: {'n': 218}, 110: {'e': 76}, 19: {'n': 20, 's': 10, 'w': 77}, 10: {'n': 19, 's': 0, 'w': 43}, 43: {'e': 10, 'w': 47}, 47: {'n': 71, 'e': 43}, 71: {'s': 47}, 0: {'n': 10, 's': 2, 'e': 4, 'w': 1}, 1: {'e': 0}, 4: {'n': 23, 'e': 13, 'w': 0}, 13: {'e': 15, 'w': 4}, 15: {'w': 13}, 23: {'s': 4, 'e': 26}, 26: {'e': 55, 'w': 23}, 55: {'w': 26}, 2: {'n': 0, 's': 6, 'e': 3}, 3: {'s': 9, 'e': 5, 'w': 2}, 5: {'w': 3}, 9: {'n': 3, 's': 12, 'e': 11}, 11: {'e': 17, 'w': 9}, 17: {'n': 24, 'e': 42, 'w': 11}, 24: {'s': 17}, 42: {'n': 44, 's': 80, 'e': 118, 'w': 17}, 44: {'s': 42}, 80: {'n': 42, 's': 81, 'e': 86}, 81: {'n': 80}, 86: {'s': 96, 'e': 90, 'w': 80}, 90: {'e': 178, 'w': 86}, 178: {'n': 209, 'e': 243, 'w': 90}, 209: {'s': 178}, 243: {'s': 293, 'e': 256, 'w': 178}, 256: {'s': 360, 'e': 327, 'w': 243}, 327: {'e': 427, 'w': 256}, 427: {'e': 430, 'w': 327}, 430: {'n': 443, 'e': 439, 'w': 427}, 439: {'w': 430}, 443: {'s': 430, 'e': 471}, 471: {'w': 443}, 360: {'n': 256, 'e': 398}, 398: {'e': 438, 'w': 360}, 438: {'e': 465, 'w': 398}, 465: {'e': 498, 'w': 438}, 498: {'w': 465}, 293: {'n': 243}, 96: {'n': 86, 'e': 97}, 97: {'e': 181, 'w': 96}, 181: {'w': 97}, 118: {'e': 137, 'w': 42}, 137: {'w': 118}, 12: {'n': 9, 's': 18, 'e': 14, 'w': 21}, 14: {'s': 34, 'e': 37, 'w': 12}, 37: {'w': 14}, 34: {'n': 14, 's': 50, 'e': 35}, 50: {'n': 34, 's': 89}, 89: {'n': 50, 's': 93}, 93: {'n': 89, 'w': 108}, 108: {'n': 78, 's': 117, 'e': 93}, 78: {'n': 22, 's': 108}, 22: {'n': 18, 's': 78, 'w': 36}, 18: {'n': 12, 's': 22, 'w': 25}, 25: {'e': 18}, 21: {'e': 12, 'w': 29}, 29: {'s': 45, 'e': 21, 'w': 49}, 49: {'s': 79, 'e': 29, 'w': 136}, 136: {'e': 49, 'w': 148}, 148: {'e': 136, 'w': 292}, 292: {'n': 301, 'e': 148}, 301: {'n': 304, 's': 292}, 304: {'s': 301}, 79: {'n': 49}, 45: {'n': 29, 's': 60}, 60: {'n': 45, 'e': 36, 'w': 70}, 36: {'s': 48, 'e': 22, 'w': 60}, 48: {'n': 36, 's': 105, 'w': 149}, 105: {'n': 48, 'w': 202}, 202: {'e': 105}, 149: {'e': 48}, 117: {'n': 108, 's': 131, 'e': 166, 'w': 133}, 166: {'s': 198, 'e': 150, 'w': 117}, 150: {'n': 135, 'w': 166}, 135: {'s': 150, 'e': 106}, 106: {'n': 100, 's': 111, 'w': 135}, 111: {'n': 106, 's': 367, 'e': 158}, 158: {'s': 167, 'w': 111}, 167: {'n': 158, 's': 262, 'e': 260}, 260: {'w': 167}, 262: {'n': 167, 's': 370, 'e': 358}, 358: {'e': 401, 'w': 262}, 401: {'w': 358}, 370: {'n': 262, 's': 434, 'e': 407}, 434: {'n': 370}, 407: {'s': 496, 'w': 370}, 496: {'n': 407}, 367: {'n': 111}, 100: {'s': 106, 'e': 112, 'w': 68}, 112: {'s': 141, 'e': 140, 'w': 100}, 140: {'w': 112}, 141: {'n': 112, 'e': 156}, 156: {'s': 168, 'e': 164, 'w': 141}, 168: {'n': 156, 'e': 340}, 340: {'w': 168}, 164: {'n': 217, 'e': 298, 'w': 156}, 217: {'s': 164, 'e': 247}, 247: {'e': 261, 'w': 217}, 261: {'s': 277, 'e': 322, 'w': 247}, 277: {'n': 261, 'e': 323}, 323: {'e': 433, 'w': 277}, 433: {'s': 455, 'e': 460, 'w': 323}, 460: {'w': 433}, 455: {'n': 433}, 322: {'n': 382, 'e': 435, 'w': 261}, 435: {'w': 322}, 382: {'s': 322, 'e': 388}, 388: {'e': 477, 'w': 382}, 477: {'e': 483, 'w': 388}, 483: {'w': 477}, 298: {'s': 324, 'w': 164}, 324: {'n': 298, 's': 349, 'e': 354}, 349: {'n': 324, 's': 352, 'e': 384, 'w': 356}, 384: {'w': 349}, 352: {'n': 349, 's': 362, 'e': 485}, 485: {'w': 352}, 362: {'n': 352, 's': 399, 'w': 463}, 399: {'n': 362, 's': 467}, 467: {'n': 399}, 463: {'s': 468, 'e': 362}, 468: {'n': 463}, 356: {'e': 349}, 354: {'w': 324}, 68: {'n': 52, 'e': 100}, 52: {'n': 35, 's': 68, 'e': 75}, 75: {'e': 85, 'w': 52}, 85: {'e': 154, 'w': 75}, 154: {'e': 193, 'w': 85}, 193: {'e': 251, 'w': 154}, 251: {'e': 315, 'w': 193}, 315: {'w': 251}, 35: {'s': 52, 'w': 34}, 6: {'n': 2, 'w': 7}, 7: {'n': 8, 'e': 6, 'w': 56}, 56: {'e': 7, 'w': 61}, 61: {'e': 56, 'w': 171}, 171: {'e': 61}, 8: {'s': 7, 'w': 16}, 16: {'n': 58, 'e': 8, 'w': 67}, 58: {'s': 16, 'w': 65}, 65: {'n': 74, 'e': 58, 'w': 139}, 74: {'n': 87, 's': 65, 'w': 161}, 161: {'e': 74}, 87: {'s': 74}, 139: {'e': 65, 'w': 188}, 188: {'e': 139, 'w': 335}, 335: {'e': 188, 'w': 366}, 366: {'e': 335}, 67: {'e': 16, 'w': 162}, 162: {'e': 67}, 77: {'e': 19}, 46: {'e': 20, 'w': 62}, 62: {'n': 64, 'e': 46, 'w': 84}, 84: {'e': 62, 'w': 91}, 91: {'n': 180, 's': 101, 'e': 84, 'w': 99}, 101: {'n': 91, 'w': 113}, 113: {'s': 114, 'e': 101}, 114: {'n': 113, 'w': 176}, 176: {'e': 114, 'w': 402}, 402: {'e': 176, 'w': 451}, 451: {'e': 402, 'w': 453}, 453: {'s': 464, 'e': 451}, 464: {'n': 453}, 99: {'n': 190, 'e': 91, 'w': 146}, 190: {'s': 99}, 146: {'n': 215, 's': 177, 'e': 99, 'w': 257}, 215: {'n': 246, 's': 146}, 246: {'s': 215}, 257: {'n': 320, 'e': 146, 'w': 364}, 364: {'n': 429, 's': 381, 'e': 257, 'w': 448}, 429: {'s': 364}, 381: {'n': 364, 'w': 394}, 394: {'e': 381}, 448: {'e': 364}, 320: {'n': 348, 's': 257}, 348: {'s': 320}, 177: {'n': 146, 'w': 346}, 346: {'e': 177}, 180: {'s': 91}, 64: {'s': 62, 'w': 82}, 82: {'n': 191, 'e': 64}, 191: {'s': 82}, 40: {'s': 27}, 92: {'w': 59}, 128: {'s': 121, 'e': 189}, 189: {'e': 255, 'w': 128}, 255: {'w': 189}, 212: {'w': 143}, 70: {'s': 163, 'e': 60, 'w': 98}, 163: {'n': 70}, 98: {'n': 102, 's': 126, 'e': 70, 'w': 109}, 126: {'n': 98, 's': 129}, 129: {'n': 126, 'e': 194, 'w': 170}, 170: {'e': 129}, 194: {'s': 214, 'w': 129}, 214: {'n': 194, 'e': 173, 'w': 226}, 173: {'e': 133, 'w': 214}, 133: {'e': 117, 'w': 173}, 131: {'n': 117, 's': 244, 'w': 138}, 244: {'n': 131, 'e': 239}, 239: {'n': 198, 'w': 244}, 198: {'n': 166, 's': 239, 'e': 199}, 199: {'s': 230, 'w': 198}, 230: {'n': 199, 's': 307, 'e': 297}, 297: {'w': 230}, 307: {'n': 230, 's': 373, 'e': 371, 'w': 321}, 371: {'s': 475, 'w': 307}, 475: {'n': 371, 's': 484}, 484: {'n': 475}, 373: {'n': 307, 's': 480}, 480: {'n': 373}, 321: {'s': 413, 'e': 307}, 413: {'n': 321}, 138: {'s': 211, 'e': 131, 'w': 195}, 195: {'s': 228, 'e': 138, 'w': 225}, 228: {'n': 195, 's': 281}, 281: {'n': 228, 's': 318, 'e': 309, 'w': 317}, 309: {'s': 333, 'e': 326, 'w': 281}, 333: {'n': 309, 's': 378}, 378: {'n': 333}, 326: {'s': 342, 'w': 309}, 492: {'e': 431}, 431: {'e': 387, 'w': 492}, 387: {'n': 317, 's': 417, 'w': 431}, 417: {'n': 387}, 317: {'s': 387, 'e': 281, 'w': 409}, 318: {'n': 281, 's': 487}, 487: {'n': 318, 's': 489}, 489: {'n': 487}, 409: {'e': 317}, 225: {'s': 278, 'e': 195}, 278: {'n': 225}, 211: {'n': 138}, 226: {'s': 300, 'e': 214}, 300: {'n': 226, 's': 377, 'w': 389}, 389: {'e': 300}, 377: {'n': 300}, 102: {'s': 98, 'w': 142}, 142: {'e': 102, 'w': 159}, 159: {'e': 142, 'w': 196}, 196: {'n': 222, 'e': 159, 'w': 197}, 197: {'n': 232, 'e': 196, 'w': 276}, 232: {'n': 272, 's': 197, 'w': 235}, 272: {'n': 295, 's': 232}, 295: {'s': 272}, 235: {'n': 330, 'e': 232, 'w': 355}, 330: {'n': 369, 's': 235, 'w': 383}, 369: {'n': 400, 's': 330, 'w': 376}, 400: {'s': 369}, 376: {'e': 369}, 383: {'e': 330, 'w': 495}, 495: {'e': 383}, 355: {'e': 235}, 276: {'e': 197, 'w': 419}, 419: {'e': 276}, 222: {'n': 305, 's': 196}, 305: {'n': 365, 's': 222}, 365: {'s': 305}, 109: {'s': 185, 'e': 98, 'w': 175}, 175: {'s': 183, 'e': 109, 'w': 179}, 183: {'n': 175, 's': 229}, 229: {'n': 183, 's': 250, 'w': 236}, 250: {'n': 229, 's': 294, 'e': 289}, 289: {'w': 250}, 294: {'n': 250, 's': 334}, 334: {'n': 294, 's': 393, 'e': 341, 'w': 391}, 341: {'s': 449, 'w': 334}, 449: {'n': 341}, 391: {'s': 396, 'e': 334, 'w': 428}, 428: {'e': 391}, 396: {'n': 391}, 393: {'n': 334, 's': 482}, 482: {'n': 393}, 236: {'s': 264, 'e': 229}, 264: {'n': 236, 's': 274, 'w': 273}, 274: {'n': 264, 'w': 308}, 308: {'e': 274}, 273: {'n': 343, 'e': 264}, 343: {'s': 273, 'w': 351}, 351: {'s': 491, 'e': 343, 'w': 478}, 478: {'e': 351}, 491: {'n': 351}, 179: {'s': 233, 'e': 175, 'w': 213}, 213: {'e': 179, 'w': 420}, 420: {'s': 444, 'e': 213, 'w': 437}, 437: {'e': 420, 'w': 497}, 497: {'e': 437}, 444: {'n': 420, 'w': 490}, 490: {'e': 444, 'w': 493}, 493: {'e': 490}, 233: {'n': 179, 'w': 238}, 238: {'e': 233}, 185: {'n': 109}, 342: {'n': 326, 's': 432}, 432: {'n': 342}} + +my_dict2 = {616: {'n': 638, 's': 620, 'e': 613, 'w': 628}, 638: {'n': 647, 's': 616}, 647: {'n': 666, 's': 638, 'w': 701}, 666: {'n': 833, 's': 647, 'e': 729, 'w': 803}, 803: {'n': 834, 'e': 666}, 834: {'n': 905, 's': 803}, 905: {'n': 977, 's': 834}, 977: {'s': 905}, 729: {'n': 731, 'w': 666}, 731: {'s': 729}, 833: {'n': 900, 's': 666}, 900: {'n': 928, 's': 833}, 928: {'s': 900}, 701: {'e': 647}, 628: {'n': 671, 'e': 616, 'w': 681}, 671: {'s': 628, 'w': 781}, 781: {'n': 787, 'e': 671}, 787: {'n': 861, 's': 781}, 861: {'n': 930, 's': 787, 'w': 862}, 862: {'n': 878, 'e': 861}, 878: {'s': 862}, 930: {'s': 861}, 681: {'e': 628, 'w': 685}, 685: {'n': 767, 's': 744, 'e': 681, 'w': 725}, 744: {'n': 685, 'w': 797}, 797: {'s': 812, 'e': 744, 'w': 807}, 812: {'n': 797, 's': 892}, 892: {'n': 812, 's': 943}, 943: {'n': 892, 'w': 952}, 952: {'e': 943}, 807: {'n': 856, 's': 864, 'e': 797, 'w': 869}, 856: {'s': 807}, 864: {'n': 807, 's': 927}, 927: {'n': 864}, 869: {'e': 807}, 725: {'e': 685}, 767: {'n': 796, 's': 685, 'w': 819}, 796: {'s': 767, 'w': 850}, 850: {'n': 954, 'e': 796, 'w': 973}, 973: {'n': 981, 'e': 850}, 981: {'s': 973}, 954: {'s': 850}, 819: {'e': 767, 'w': 893}, 893: {'e': 819, 'w': 944}, 944: {'e': 893}, 613: {'e': 575, 'w': 616}, 575: {'e': 547, 'w': 613}, 547: {'e': 537, 'w': 575}, 537: {'e': 527, 'w': 547}, 527: {'e': 516, 'w': 537}, 516: {'s': 528, 'e': 511, 'w': 527}, 597: {'s': 626, 'e': 596, 'w': 657}, 626: {'n': 597}, 596: {'n': 566, 'w': 597}, 566: {'s': 596, 'e': 562, 'w': 581}, 581: {'e': 566, 'w': 614}, 614: {'e': 581}, 562: {'e': 535, 'w': 566}, 535: {'e': 528, 'w': 562}, 528: {'n': 516, 's': 555, 'w': 535}, 555: {'n': 528}, 511: {'n': 512, 'e': 507, 'w': 516}, 507: {'n': 514, 's': 506, 'e': 518, 'w': 511}, 518: {'e': 519, 'w': 507}, 519: {'n': 563, 's': 583, 'e': 520, 'w': 518}, 563: {'s': 519}, 583: {'n': 519, 'e': 595}, 595: {'w': 583}, 520: {'n': 579, 'e': 603, 'w': 519}, 579: {'n': 601, 's': 520}, 601: {'n': 617, 's': 579, 'e': 629}, 629: {'n': 684, 'e': 667, 'w': 601}, 667: {'e': 717, 'w': 629}, 717: {'e': 820, 'w': 667}, 820: {'n': 866, 'e': 876, 'w': 717}, 866: {'s': 820}, 876: {'w': 820}, 684: {'n': 718, 's': 629, 'e': 687}, 687: {'e': 806, 'w': 684}, 806: {'n': 909, 'w': 687}, 909: {'n': 910, 's': 806, 'e': 917}, 917: {'e': 929, 'w': 909}, 929: {'w': 917}, 910: {'s': 909}, 718: {'n': 734, 's': 684, 'e': 782}, 782: {'w': 718}, 734: {'s': 718}, 617: {'n': 645, 's': 601}, 645: {'s': 617}, 603: {'n': 618, 's': 609, 'w': 520}, 609: {'n': 603, 's': 623, 'e': 652}, 623: {'n': 609, 'e': 633}, 633: {'e': 711, 'w': 623}, 711: {'n': 721, 'e': 724, 'w': 633}, 721: {'s': 711}, 724: {'n': 737, 's': 748, 'e': 728, 'w': 711}, 737: {'n': 756, 's': 724}, 756: {'s': 737, 'e': 868}, 868: {'n': 885, 'w': 756}, 885: {'s': 868}, 728: {'n': 741, 'e': 762, 'w': 724}, 741: {'s': 728, 'e': 793}, 793: {'n': 808, 'e': 901, 'w': 741}, 808: {'n': 821, 's': 793, 'e': 920}, 920: {'e': 946, 'w': 808}, 946: {'w': 920}, 821: {'n': 974, 's': 808, 'e': 953}, 974: {'s': 821}, 953: {'w': 821}, 901: {'w': 793}, 762: {'e': 874, 'w': 728}, 874: {'e': 902, 'w': 762}, 902: {'e': 956, 'w': 874}, 956: {'e': 960, 'w': 902}, 960: {'e': 966, 'w': 956}, 966: {'e': 992, 'w': 960}, 992: {'w': 966}, 748: {'n': 724, 's': 772, 'e': 764}, 764: {'s': 769, 'e': 848, 'w': 748}, 848: {'e': 853, 'w': 764}, 853: {'s': 958, 'e': 939, 'w': 848}, 939: {'w': 853}, 958: {'n': 853, 's': 972}, 972: {'n': 958}, 769: {'n': 764, 's': 799, 'e': 847}, 847: {'w': 769}, 799: {'n': 769, 'e': 908}, 908: {'w': 799}, 772: {'n': 748, 's': 780}, 780: {'n': 772, 's': 818}, 818: {'n': 780, 's': 877, 'e': 829}, 829: {'e': 912, 'w': 818}, 912: {'w': 829}, 877: {'n': 818, 's': 997, 'e': 937}, 937: {'w': 877}, 997: {'n': 877}, 652: {'w': 609}, 618: {'s': 603, 'e': 631}, 631: {'s': 646, 'w': 618}, 646: {'n': 631, 'e': 662}, 662: {'n': 675, 'w': 646}, 675: {'s': 662, 'e': 768}, 768: {'w': 675}, 514: {'n': 521, 's': 507, 'e': 515}, 515: {'n': 576, 'w': 514}, 576: {'n': 582, 's': 515, 'e': 578}, 582: {'n': 642, 's': 576, 'e': 644}, 642: {'s': 582}, 644: {'n': 664, 'w': 582}, 664: {'n': 680, 's': 644}, 680: {'s': 664}, 578: {'w': 576}, 521: {'n': 522, 's': 514}, 522: {'n': 536, 's': 521}, 536: {'n': 658, 's': 522}, 658: {'n': 678, 's': 536, 'e': 672}, 672: {'w': 658}, 678: {'s': 658, 'e': 703}, 703: {'n': 709, 'e': 733, 'w': 678}, 709: {'n': 736, 's': 703, 'e': 712}, 736: {'s': 709, 'e': 786}, 786: {'n': 798, 'e': 961, 'w': 736}, 798: {'n': 889, 's': 786}, 889: {'n': 919, 's': 798, 'e': 923, 'w': 915}, 923: {'w': 889}, 919: {'s': 889}, 915: {'e': 889}, 961: {'w': 786}, 712: {'e': 739, 'w': 709}, 739: {'w': 712}, 733: {'e': 740, 'w': 703}, 740: {'s': 770, 'e': 751, 'w': 733}, 770: {'n': 740}, 751: {'n': 810, 'e': 794, 'w': 740}, 810: {'s': 751}, 794: {'n': 802, 's': 896, 'e': 841, 'w': 751}, 841: {'e': 962, 'w': 794}, 962: {'s': 963, 'w': 841}, 963: {'n': 962, 'e': 982}, 982: {'n': 995, 'w': 963}, 995: {'s': 982, 'e': 996}, 996: {'w': 995}, 896: {'n': 794}, 802: {'n': 830, 's': 794, 'e': 865}, 830: {'s': 802}, 865: {'n': 924, 'e': 897, 'w': 802}, 924: {'s': 865, 'e': 979}, 979: {'w': 924}, 897: {'e': 986, 'w': 865}, 986: {'w': 897}, 506: {'n': 507, 's': 504, 'e': 531, 'w': 529}, 531: {'w': 506}, 504: {'n': 506, 's': 500, 'e': 544, 'w': 523}, 500: {'n': 504, 's': 502, 'e': 503, 'w': 501}, 503: {'w': 500}, 502: {'n': 500, 's': 508, 'e': 505, 'w': 509}, 508: {'n': 502, 's': 561}, 561: {'n': 508, 's': 571}, 571: {'n': 561, 's': 584}, 584: {'n': 571, 's': 669}, 669: {'n': 584, 's': 695}, 695: {'n': 669, 's': 757, 'e': 696}, 757: {'n': 695, 's': 814}, 814: {'n': 757, 's': 849}, 849: {'n': 814, 'e': 955}, 955: {'w': 849}, 696: {'s': 753, 'w': 695}, 753: {'n': 696, 's': 784, 'e': 775}, 784: {'n': 753}, 775: {'s': 823, 'e': 790, 'w': 753}, 790: {'e': 835, 'w': 775}, 835: {'e': 883, 'w': 790}, 883: {'s': 890, 'e': 891, 'w': 835}, 890: {'n': 883, 'w': 926}, 926: {'e': 890}, 891: {'s': 969, 'w': 883}, 969: {'n': 891, 'e': 984}, 984: {'w': 969}, 823: {'n': 775, 'e': 824}, 824: {'s': 827, 'w': 823}, 827: {'n': 824, 's': 832, 'e': 904, 'w': 985}, 832: {'n': 827, 's': 932, 'e': 844, 'w': 888}, 888: {'e': 832, 'w': 936}, 936: {'s': 988, 'e': 888}, 988: {'n': 936}, 932: {'n': 832, 'e': 950}, 950: {'w': 932}, 844: {'w': 832}, 985: {'e': 827}, 904: {'e': 976, 'w': 827}, 976: {'w': 904}, 505: {'e': 525, 'w': 502}, 525: {'n': 560, 's': 542, 'e': 533, 'w': 505}, 542: {'n': 525, 's': 549, 'w': 554}, 554: {'s': 567, 'e': 542}, 567: {'n': 554, 's': 574}, 574: {'n': 567, 's': 588}, 588: {'n': 574}, 549: {'n': 542, 's': 556}, 556: {'n': 549, 's': 600, 'e': 598}, 600: {'n': 556, 's': 648, 'e': 610}, 648: {'n': 600, 's': 735, 'w': 673}, 673: {'e': 648}, 735: {'n': 648}, 610: {'s': 732, 'w': 600}, 732: {'n': 610, 's': 779}, 779: {'n': 732}, 598: {'e': 659, 'w': 556}, 659: {'s': 665, 'e': 754, 'w': 598}, 754: {'w': 659}, 665: {'n': 659, 's': 723, 'e': 700}, 700: {'s': 813, 'w': 665}, 813: {'n': 700, 's': 831, 'e': 858}, 831: {'n': 813}, 858: {'s': 907, 'e': 879, 'w': 813}, 907: {'n': 858, 'e': 925}, 925: {'s': 965, 'w': 907}, 965: {'n': 925, 'e': 980}, 980: {'s': 999, 'w': 965}, 999: {'n': 980}, 879: {'w': 858}, 723: {'n': 665, 's': 816}, 816: {'n': 723}, 533: {'s': 539, 'w': 525}, 539: {'n': 533, 's': 540}, 540: {'n': 539, 'e': 585}, 585: {'e': 682, 'w': 540}, 682: {'w': 585}, 560: {'s': 525, 'e': 602}, 602: {'e': 612, 'w': 560}, 612: {'s': 637, 'e': 635, 'w': 602}, 635: {'e': 720, 'w': 612}, 720: {'w': 635}, 637: {'n': 612, 's': 651, 'e': 650}, 650: {'e': 758, 'w': 637}, 758: {'w': 650}, 651: {'n': 637, 'e': 674}, 674: {'e': 778, 'w': 651}, 778: {'s': 815, 'w': 674}, 815: {'n': 778, 's': 825}, 825: {'n': 815, 's': 854}, 854: {'n': 825}, 509: {'s': 524, 'e': 502, 'w': 510}, 510: {'n': 517, 'e': 509, 'w': 513}, 517: {'s': 510}, 513: {'n': 550, 'e': 510, 'w': 532}, 532: {'n': 553, 'e': 513, 'w': 568}, 553: {'n': 593, 's': 532}, 593: {'s': 553}, 568: {'n': 573, 'e': 532, 'w': 580}, 580: {'e': 568, 'w': 606}, 606: {'s': 608, 'e': 580, 'w': 722}, 722: {'e': 606, 'w': 763}, 763: {'s': 826, 'e': 722, 'w': 846}, 846: {'e': 763}, 826: {'n': 763}, 608: {'n': 606, 'w': 752}, 752: {'e': 608}, 573: {'s': 568}, 550: {'n': 570, 's': 513}, 570: {'s': 550}, 524: {'n': 509, 's': 545, 'w': 526}, 545: {'n': 524, 's': 565}, 565: {'n': 545, 's': 590}, 590: {'n': 565, 's': 625}, 625: {'n': 590, 's': 699}, 699: {'n': 625, 's': 809}, 809: {'n': 699}, 526: {'s': 538, 'e': 524, 'w': 530}, 530: {'s': 577, 'e': 526, 'w': 559}, 577: {'n': 530, 's': 589}, 589: {'n': 577}, 559: {'s': 572, 'e': 530, 'w': 569}, 569: {'e': 559, 'w': 615}, 615: {'e': 569}, 572: {'n': 559, 's': 621, 'w': 607}, 621: {'n': 572, 's': 634}, 634: {'n': 621, 's': 639, 'w': 636}, 639: {'n': 634, 's': 653, 'w': 702}, 653: {'n': 639, 's': 661, 'w': 690}, 661: {'n': 653, 'w': 788}, 788: {'e': 661, 'w': 867}, 867: {'e': 788, 'w': 881}, 881: {'s': 898, 'e': 867, 'w': 884}, 898: {'n': 881}, 884: {'e': 881}, 690: {'e': 653, 'w': 817}, 817: {'e': 690}, 702: {'e': 639, 'w': 715}, 715: {'e': 702, 'w': 791}, 791: {'s': 855, 'e': 715, 'w': 852}, 855: {'n': 791}, 852: {'s': 903, 'e': 791, 'w': 978}, 978: {'e': 852}, 903: {'n': 852, 'w': 951}, 951: {'e': 903}, 636: {'e': 634}, 607: {'s': 640, 'e': 572, 'w': 630}, 640: {'n': 607, 'w': 693}, 693: {'s': 694, 'e': 640, 'w': 765}, 765: {'s': 870, 'e': 693}, 870: {'n': 765, 'w': 882}, 882: {'e': 870}, 694: {'n': 693}, 630: {'e': 607, 'w': 755}, 755: {'e': 630, 'w': 766}, 766: {'s': 931, 'e': 755, 'w': 857}, 857: {'s': 875, 'e': 766, 'w': 918}, 875: {'n': 857, 's': 989}, 989: {'n': 875}, 918: {'n': 933, 'e': 857, 'w': 994}, 994: {'e': 918}, 933: {'s': 918}, 931: {'n': 766}, 538: {'n': 526, 's': 564}, 564: {'n': 538, 's': 586}, 586: {'n': 564, 's': 619, 'w': 599}, 619: {'n': 586, 's': 670}, 670: {'n': 619, 's': 707}, 707: {'n': 670, 's': 719}, 719: {'n': 707, 's': 749, 'e': 800}, 749: {'n': 719, 's': 859, 'e': 822}, 822: {'s': 872, 'w': 749}, 872: {'n': 822, 's': 906, 'e': 968}, 968: {'w': 872}, 906: {'n': 872}, 859: {'n': 749, 's': 938}, 938: {'n': 859, 's': 975}, 975: {'n': 938, 's': 983}, 983: {'n': 975}, 800: {'w': 719}, 599: {'s': 632, 'e': 586}, 632: {'n': 599, 's': 654}, 654: {'n': 632, 's': 677}, 677: {'n': 654, 's': 691}, 691: {'n': 677, 's': 716, 'w': 704}, 704: {'e': 691, 'w': 774}, 774: {'e': 704, 'w': 842}, 842: {'e': 774}, 716: {'n': 691, 's': 836, 'w': 761}, 761: {'s': 863, 'e': 716, 'w': 837}, 837: {'e': 761, 'w': 948}, 948: {'e': 837, 'w': 998}, 998: {'e': 948}, 863: {'n': 761, 's': 913, 'w': 873}, 873: {'s': 914, 'e': 863, 'w': 899}, 914: {'n': 873}, 899: {'e': 873}, 913: {'n': 863, 's': 922}, 922: {'n': 913, 's': 964, 'w': 959}, 959: {'e': 922}, 964: {'n': 922}, 836: {'n': 716, 's': 860}, 860: {'n': 836, 's': 941}, 941: {'n': 860, 's': 947}, 947: {'n': 941}, 501: {'e': 500}, 523: {'e': 504}, 544: {'e': 552, 'w': 504}, 552: {'e': 604, 'w': 544}, 604: {'w': 552}, 529: {'e': 506}, 512: {'n': 534, 's': 511, 'w': 541}, 541: {'n': 543, 'e': 512, 'w': 546}, 546: {'n': 557, 'e': 541, 'w': 548}, 557: {'s': 546}, 548: {'n': 655, 'e': 546, 'w': 605}, 605: {'n': 679, 'e': 548, 'w': 611}, 679: {'s': 605}, 611: {'n': 656, 'e': 605, 'w': 624}, 624: {'n': 689, 'e': 611}, 689: {'s': 624}, 656: {'n': 727, 's': 611}, 727: {'n': 759, 's': 656}, 759: {'n': 880, 's': 727}, 880: {'s': 759, 'w': 886}, 886: {'e': 880}, 655: {'s': 548}, 543: {'s': 541}, 534: {'n': 551, 's': 512}, 551: {'n': 591, 's': 534, 'w': 558}, 558: {'e': 551, 'w': 587}, 587: {'n': 594, 'e': 558, 'w': 592}, 594: {'n': 649, 's': 587, 'e': 622, 'w': 641}, 622: {'w': 594}, 649: {'s': 594}, 641: {'n': 663, 'e': 594, 'w': 683}, 663: {'s': 641}, 683: {'n': 713, 'e': 641}, 713: {'n': 747, 's': 683}, 747: {'n': 839, 's': 713, 'w': 828}, 839: {'s': 747, 'w': 911}, 911: {'e': 839, 'w': 921}, 921: {'e': 911, 'w': 990}, 990: {'e': 921, 'w': 991}, 991: {'e': 990}, 828: {'e': 747}, 592: {'e': 587, 'w': 697}, 697: {'e': 592}, 591: {'n': 627, 's': 551}, 627: {'n': 643, 's': 591}, 643: {'n': 676, 's': 627, 'w': 668}, 668: {'n': 706, 's': 738, 'e': 643, 'w': 688}, 706: {'n': 743, 's': 668}, 743: {'n': 760, 's': 706, 'w': 750}, 750: {'n': 776, 'e': 743, 'w': 840}, 840: {'e': 750, 'w': 887}, 887: {'e': 840, 'w': 949}, 949: {'e': 887}, 776: {'n': 777, 's': 750, 'w': 805}, 805: {'e': 776, 'w': 838}, 838: {'n': 851, 'e': 805, 'w': 845}, 845: {'n': 895, 'e': 838}, 895: {'s': 845, 'w': 916}, 916: {'s': 993, 'e': 895, 'w': 987}, 987: {'e': 916}, 993: {'n': 916}, 851: {'n': 940, 's': 838}, 940: {'s': 851}, 777: {'s': 776, 'e': 785, 'w': 894}, 894: {'n': 935, 'e': 777}, 935: {'n': 957, 's': 894}, 957: {'s': 935}, 785: {'w': 777}, 760: {'s': 743}, 738: {'n': 668}, 688: {'n': 745, 'e': 668, 'w': 730}, 745: {'s': 688, 'w': 792}, 792: {'e': 745}, 730: {'e': 688}, 676: {'n': 726, 's': 643, 'e': 686}, 686: {'w': 676}, 726: {'n': 773, 's': 676, 'e': 746}, 746: {'n': 771, 'w': 726}, 771: {'s': 746, 'e': 801}, 801: {'w': 771}, 773: {'n': 789, 's': 726}, 789: {'s': 773, 'e': 795}, 795: {'n': 804, 'w': 789}, 804: {'n': 971, 's': 795, 'e': 970, 'w': 811}, 811: {'e': 804, 'w': 934}, 934: {'n': 945, 'e': 811}, 945: {'n': 967, 's': 934}, 967: {'s': 945}, 971: {'s': 804}, 970: {'w': 804}, 620: {'n': 616, 's': 660, 'w': 692}, 692: {'s': 698, 'e': 620, 'w': 710}, 698: {'n': 692, 's': 714, 'w': 742}, 742: {'e': 698, 'w': 843}, 843: {'e': 742}, 714: {'n': 698, 'w': 783}, 783: {'e': 714, 'w': 871}, 871: {'s': 942, 'e': 783}, 942: {'n': 871}, 710: {'e': 692}, 660: {'n': 620}} + +z = {**my_dict, **my_dict2} +print(len(z)) \ No newline at end of file diff --git a/move_sell_pray/path.py b/move_sell_pray/path.py new file mode 100644 index 00000000..9c95f229 --- /dev/null +++ b/move_sell_pray/path.py @@ -0,0 +1,5 @@ +my_dict1 = {143: {'e': 212, 'w': 121}, 121: {'n': 128, 'e': 143, 'w': 107}, 107: {'s': 120, 'e': 121, 'w': 104}, 120: {'n': 107, 'e': 127}, 127: {'e': 184, 'w': 120}, 184: {'e': 221, 'w': 127}, 221: {'s': 253, 'e': 240, 'w': 184}, 253: {'n': 221, 'e': 258}, 258: {'e': 306, 'w': 253}, 306: {'e': 397, 'w': 258}, 397: {'w': 306}, 240: {'n': 249, 'e': 386, 'w': 221}, 249: {'n': 265, 's': 240, 'e': 282}, 282: {'w': 249}, 265: {'n': 279, 's': 249, 'e': 270}, 279: {'s': 265}, 270: {'n': 416, 'e': 338, 'w': 265}, 338: {'s': 379, 'w': 270}, 379: {'n': 338, 'e': 395}, 395: {'s': 403, 'e': 421, 'w': 379}, 403: {'n': 395}, 421: {'n': 440, 'w': 395}, 440: {'s': 421, 'w': 476}, 476: {'e': 440}, 416: {'s': 270}, 386: {'e': 414, 'w': 240}, 414: {'w': 386}, 104: {'n': 59, 'e': 107}, 59: {'n': 38, 's': 104, 'e': 92}, 38: {'s': 59, 'e': 66, 'w': 33}, 66: {'n': 169, 'e': 123, 'w': 38}, 123: {'w': 66}, 169: {'s': 66, 'e': 186}, 186: {'e': 205, 'w': 169}, 205: {'s': 241, 'e': 479, 'w': 186}, 479: {'w': 205}, 241: {'n': 205, 'e': 266}, 266: {'w': 241}, 33: {'e': 38, 'w': 31}, 31: {'n': 30, 'e': 33}, 30: {'s': 31, 'e': 32, 'w': 27}, 32: {'n': 39, 'e': 54, 'w': 30}, 39: {'n': 53, 's': 32, 'e': 51, 'w': 41}, 41: {'e': 39}, 51: {'n': 69, 'e': 57, 'w': 39}, 57: {'e': 145, 'w': 51}, 145: {'n': 174, 'e': 220, 'w': 57}, 220: {'w': 145}, 174: {'n': 192, 's': 145, 'e': 224}, 224: {'w': 174}, 192: {'n': 201, 's': 174, 'e': 223}, 223: {'n': 283, 'w': 192}, 283: {'n': 331, 's': 223, 'e': 313}, 313: {'w': 283}, 331: {'s': 283, 'e': 446}, 446: {'e': 466, 'w': 331}, 466: {'s': 486, 'e': 472, 'w': 446}, 486: {'n': 466}, 472: {'w': 466}, 201: {'s': 192}, 69: {'n': 94, 's': 51, 'e': 103}, 94: {'n': 152, 's': 69}, 152: {'s': 94}, 103: {'n': 160, 'w': 69}, 160: {'s': 103}, 53: {'n': 95, 's': 39, 'w': 88}, 88: {'e': 53, 'w': 122}, 122: {'n': 124, 'e': 88}, 124: {'n': 157, 's': 122}, 157: {'n': 210, 's': 124, 'w': 182}, 182: {'e': 157, 'w': 208}, 208: {'e': 182}, 210: {'s': 157}, 95: {'n': 119, 's': 53, 'w': 115}, 119: {'n': 134, 's': 95}, 134: {'n': 147, 's': 119, 'e': 144}, 144: {'e': 155, 'w': 134}, 155: {'s': 187, 'e': 316, 'w': 144}, 187: {'n': 155}, 316: {'n': 344, 'w': 155}, 344: {'n': 392, 's': 316, 'e': 390}, 392: {'s': 344, 'e': 462}, 462: {'w': 392}, 390: {'w': 344}, 147: {'n': 200, 's': 134, 'e': 153, 'w': 151}, 200: {'n': 227, 's': 147, 'e': 206}, 227: {'n': 269, 's': 200}, 269: {'n': 319, 's': 227}, 319: {'n': 359, 's': 269, 'e': 345}, 359: {'s': 319}, 345: {'s': 375, 'w': 319}, 375: {'n': 345, 'e': 385}, 385: {'w': 375}, 206: {'n': 288, 'e': 380, 'w': 200}, 380: {'n': 424, 'w': 206}, 424: {'s': 380, 'e': 473}, 473: {'e': 494, 'w': 424}, 494: {'w': 473}, 288: {'s': 206}, 151: {'n': 172, 'e': 147, 'w': 207}, 207: {'n': 231, 'e': 151, 'w': 290}, 231: {'s': 207, 'w': 248}, 248: {'n': 296, 'e': 231, 'w': 280}, 280: {'n': 325, 'e': 248}, 325: {'n': 353, 's': 280, 'w': 374}, 374: {'e': 325}, 353: {'s': 325}, 296: {'s': 248}, 290: {'e': 207}, 172: {'n': 267, 's': 151}, 267: {'n': 285, 's': 172, 'w': 271}, 271: {'n': 337, 'e': 267}, 337: {'s': 271}, 285: {'n': 286, 's': 267}, 286: {'n': 336, 's': 285, 'w': 291}, 291: {'n': 410, 'e': 286, 'w': 347}, 347: {'n': 452, 's': 442, 'e': 291}, 452: {'s': 347}, 442: {'n': 347}, 410: {'s': 291}, 336: {'s': 286}, 153: {'e': 329, 'w': 147}, 329: {'w': 153}, 115: {'n': 116, 'e': 95}, 116: {'n': 132, 's': 115}, 132: {'s': 116}, 54: {'w': 32}, 27: {'n': 40, 's': 28, 'e': 30, 'w': 20}, 28: {'n': 27}, 20: {'n': 63, 's': 19, 'e': 27, 'w': 46}, 63: {'n': 72, 's': 20, 'w': 73}, 73: {'e': 63}, 72: {'s': 63, 'w': 76}, 76: {'n': 83, 'e': 72, 'w': 110}, 83: {'s': 76, 'e': 130, 'w': 125}, 130: {'w': 83}, 125: {'n': 165, 'e': 83, 'w': 237}, 237: {'e': 125, 'w': 245}, 245: {'s': 254, 'e': 237}, 254: {'n': 245, 'w': 314}, 314: {'e': 254}, 165: {'n': 203, 's': 125, 'w': 204}, 203: {'n': 268, 's': 165, 'e': 299}, 299: {'e': 311, 'w': 203}, 311: {'w': 299}, 268: {'s': 203, 'e': 411, 'w': 312}, 411: {'w': 268}, 312: {'n': 328, 'e': 268}, 328: {'n': 332, 's': 312, 'e': 357, 'w': 363}, 332: {'n': 350, 's': 328}, 350: {'n': 436, 's': 332, 'e': 404}, 436: {'s': 350}, 404: {'n': 481, 'w': 350}, 481: {'s': 404}, 363: {'n': 372, 'e': 328}, 372: {'n': 441, 's': 363}, 441: {'s': 372}, 357: {'w': 328}, 204: {'n': 219, 'e': 165, 'w': 216}, 219: {'s': 204}, 216: {'n': 234, 'e': 204, 'w': 218}, 234: {'n': 368, 's': 216, 'w': 252}, 252: {'n': 284, 'e': 234}, 284: {'n': 302, 's': 252, 'w': 303}, 303: {'n': 361, 'e': 284, 'w': 405}, 405: {'n': 406, 'e': 303}, 406: {'s': 405, 'w': 415}, 415: {'e': 406, 'w': 418}, 418: {'n': 425, 's': 474, 'e': 415}, 474: {'n': 418}, 425: {'s': 418, 'w': 469}, 469: {'e': 425}, 361: {'n': 408, 's': 303}, 408: {'n': 458, 's': 361, 'w': 423}, 423: {'e': 408, 'w': 454}, 454: {'n': 470, 'e': 423}, 470: {'s': 454}, 458: {'s': 408, 'w': 459}, 459: {'e': 458}, 302: {'n': 422, 's': 284}, 422: {'n': 426, 's': 302}, 426: {'n': 457, 's': 422}, 457: {'n': 461, 's': 426}, 461: {'s': 457}, 368: {'s': 234}, 218: {'s': 263, 'e': 216, 'w': 242}, 242: {'n': 287, 's': 259, 'e': 218, 'w': 275}, 287: {'s': 242, 'w': 339}, 339: {'e': 287, 'w': 445}, 445: {'n': 447, 'e': 339, 'w': 450}, 450: {'e': 445}, 447: {'s': 445}, 259: {'n': 242, 'w': 310}, 310: {'e': 259, 'w': 412}, 412: {'s': 488, 'e': 310}, 488: {'n': 412}, 275: {'e': 242, 'w': 456}, 456: {'e': 275, 'w': 499}, 499: {'e': 456}, 263: {'n': 218}, 110: {'e': 76}, 19: {'n': 20, 's': 10, 'w': 77}, 10: {'n': 19, 's': 0, 'w': 43}, 43: {'e': 10, 'w': 47}, 47: {'n': 71, 'e': 43}, 71: {'s': 47}, 0: {'n': 10, 's': 2, 'e': 4, 'w': 1}, 1: {'e': 0}, 4: {'n': 23, 'e': 13, 'w': 0}, 13: {'e': 15, 'w': 4}, 15: {'w': 13}, 23: {'s': 4, 'e': 26}, 26: {'e': 55, 'w': 23}, 55: {'w': 26}, 2: {'n': 0, 's': 6, 'e': 3}, 3: {'s': 9, 'e': 5, 'w': 2}, 5: {'w': 3}, 9: {'n': 3, 's': 12, 'e': 11}, 11: {'e': 17, 'w': 9}, 17: {'n': 24, 'e': 42, 'w': 11}, 24: {'s': 17}, 42: {'n': 44, 's': 80, 'e': 118, 'w': 17}, 44: {'s': 42}, 80: {'n': 42, 's': 81, 'e': 86}, 81: {'n': 80}, 86: {'s': 96, 'e': 90, 'w': 80}, 90: {'e': 178, 'w': 86}, 178: {'n': 209, 'e': 243, 'w': 90}, 209: {'s': 178}, 243: {'s': 293, 'e': 256, 'w': 178}, 256: {'s': 360, 'e': 327, 'w': 243}, 327: {'e': 427, 'w': 256}, 427: {'e': 430, 'w': 327}, 430: {'n': 443, 'e': 439, 'w': 427}, 439: {'w': 430}, 443: {'s': 430, 'e': 471}, 471: {'w': 443}, 360: {'n': 256, 'e': 398}, 398: {'e': 438, 'w': 360}, 438: {'e': 465, 'w': 398}, 465: {'e': 498, 'w': 438}, 498: {'w': 465}, 293: {'n': 243}, 96: {'n': 86, 'e': 97}, 97: {'e': 181, 'w': 96}, 181: {'w': 97}, 118: {'e': 137, 'w': 42}, 137: {'w': 118}, 12: {'n': 9, 's': 18, 'e': 14, 'w': 21}, 14: {'s': 34, 'e': 37, 'w': 12}, 37: {'w': 14}, 34: {'n': 14, 's': 50, 'e': 35}, 50: {'n': 34, 's': 89}, 89: {'n': 50, 's': 93}, 93: {'n': 89, 'w': 108}, 108: {'n': 78, 's': 117, 'e': 93}, 78: {'n': 22, 's': 108}, 22: {'n': 18, 's': 78, 'w': 36}, 18: {'n': 12, 's': 22, 'w': 25}, 25: {'e': 18}, 21: {'e': 12, 'w': 29}, 29: {'s': 45, 'e': 21, 'w': 49}, 49: {'s': 79, 'e': 29, 'w': 136}, 136: {'e': 49, 'w': 148}, 148: {'e': 136, 'w': 292}, 292: {'n': 301, 'e': 148}, 301: {'n': 304, 's': 292}, 304: {'s': 301}, 79: {'n': 49}, 45: {'n': 29, 's': 60}, 60: {'n': 45, 'e': 36, 'w': 70}, 36: {'s': 48, 'e': 22, 'w': 60}, 48: {'n': 36, 's': 105, 'w': 149}, 105: {'n': 48, 'w': 202}, 202: {'e': 105}, 149: {'e': 48}, 117: {'n': 108, 's': 131, 'e': 166, 'w': 133}, 166: {'s': 198, 'e': 150, 'w': 117}, 150: {'n': 135, 'w': 166}, 135: {'s': 150, 'e': 106}, 106: {'n': 100, 's': 111, 'w': 135}, 111: {'n': 106, 's': 367, 'e': 158}, 158: {'s': 167, 'w': 111}, 167: {'n': 158, 's': 262, 'e': 260}, 260: {'w': 167}, 262: {'n': 167, 's': 370, 'e': 358}, 358: {'e': 401, 'w': 262}, 401: {'w': 358}, 370: {'n': 262, 's': 434, 'e': 407}, 434: {'n': 370}, 407: {'s': 496, 'w': 370}, 496: {'n': 407}, 367: {'n': 111}, 100: {'s': 106, 'e': 112, 'w': 68}, 112: {'s': 141, 'e': 140, 'w': 100}, 140: {'w': 112}, 141: {'n': 112, 'e': 156}, 156: {'s': 168, 'e': 164, 'w': 141}, 168: {'n': 156, 'e': 340}, 340: {'w': 168}, 164: {'n': 217, 'e': 298, 'w': 156}, 217: {'s': 164, 'e': 247}, 247: {'e': 261, 'w': 217}, 261: {'s': 277, 'e': 322, 'w': 247}, 277: {'n': 261, 'e': 323}, 323: {'e': 433, 'w': 277}, 433: {'s': 455, 'e': 460, 'w': 323}, 460: {'w': 433}, 455: {'n': 433}, 322: {'n': 382, 'e': 435, 'w': 261}, 435: {'w': 322}, 382: {'s': 322, 'e': 388}, 388: {'e': 477, 'w': 382}, 477: {'e': 483, 'w': 388}, 483: {'w': 477}, 298: {'s': 324, 'w': 164}, 324: {'n': 298, 's': 349, 'e': 354}, 349: {'n': 324, 's': 352, 'e': 384, 'w': 356}, 384: {'w': 349}, 352: {'n': 349, 's': 362, 'e': 485}, 485: {'w': 352}, 362: {'n': 352, 's': 399, 'w': 463}, 399: {'n': 362, 's': 467}, 467: {'n': 399}, 463: {'s': 468, 'e': 362}, 468: {'n': 463}, 356: {'e': 349}, 354: {'w': 324}, 68: {'n': 52, 'e': 100}, 52: {'n': 35, 's': 68, 'e': 75}, 75: {'e': 85, 'w': 52}, 85: {'e': 154, 'w': 75}, 154: {'e': 193, 'w': 85}, 193: {'e': 251, 'w': 154}, 251: {'e': 315, 'w': 193}, 315: {'w': 251}, 35: {'s': 52, 'w': 34}, 6: {'n': 2, 'w': 7}, 7: {'n': 8, 'e': 6, 'w': 56}, 56: {'e': 7, 'w': 61}, 61: {'e': 56, 'w': 171}, 171: {'e': 61}, 8: {'s': 7, 'w': 16}, 16: {'n': 58, 'e': 8, 'w': 67}, 58: {'s': 16, 'w': 65}, 65: {'n': 74, 'e': 58, 'w': 139}, 74: {'n': 87, 's': 65, 'w': 161}, 161: {'e': 74}, 87: {'s': 74}, 139: {'e': 65, 'w': 188}, 188: {'e': 139, 'w': 335}, 335: {'e': 188, 'w': 366}, 366: {'e': 335}, 67: {'e': 16, 'w': 162}, 162: {'e': 67}, 77: {'e': 19}, 46: {'e': 20, 'w': 62}, 62: {'n': 64, 'e': 46, 'w': 84}, 84: {'e': 62, 'w': 91}, 91: {'n': 180, 's': 101, 'e': 84, 'w': 99}, 101: {'n': 91, 'w': 113}, 113: {'s': 114, 'e': 101}, 114: {'n': 113, 'w': 176}, 176: {'e': 114, 'w': 402}, 402: {'e': 176, 'w': 451}, 451: {'e': 402, 'w': 453}, 453: {'s': 464, 'e': 451}, 464: {'n': 453}, 99: {'n': 190, 'e': 91, 'w': 146}, 190: {'s': 99}, 146: {'n': 215, 's': 177, 'e': 99, 'w': 257}, 215: {'n': 246, 's': 146}, 246: {'s': 215}, 257: {'n': 320, 'e': 146, 'w': 364}, 364: {'n': 429, 's': 381, 'e': 257, 'w': 448}, 429: {'s': 364}, 381: {'n': 364, 'w': 394}, 394: {'e': 381}, 448: {'e': 364}, 320: {'n': 348, 's': 257}, 348: {'s': 320}, 177: {'n': 146, 'w': 346}, 346: {'e': 177}, 180: {'s': 91}, 64: {'s': 62, 'w': 82}, 82: {'n': 191, 'e': 64}, 191: {'s': 82}, 40: {'s': 27}, 92: {'w': 59}, 128: {'s': 121, 'e': 189}, 189: {'e': 255, 'w': 128}, 255: {'w': 189}, 212: {'w': 143}, 70: {'s': 163, 'e': 60, 'w': 98}, 163: {'n': 70}, 98: {'n': 102, 's': 126, 'e': 70, 'w': 109}, 126: {'n': 98, 's': 129}, 129: {'n': 126, 'e': 194, 'w': 170}, 170: {'e': 129}, 194: {'s': 214, 'w': 129}, 214: {'n': 194, 'e': 173, 'w': 226}, 173: {'e': 133, 'w': 214}, 133: {'e': 117, 'w': 173}, 131: {'n': 117, 's': 244, 'w': 138}, 244: {'n': 131, 'e': 239}, 239: {'n': 198, 'w': 244}, 198: {'n': 166, 's': 239, 'e': 199}, 199: {'s': 230, 'w': 198}, 230: {'n': 199, 's': 307, 'e': 297}, 297: {'w': 230}, 307: {'n': 230, 's': 373, 'e': 371, 'w': 321}, 371: {'s': 475, 'w': 307}, 475: {'n': 371, 's': 484}, 484: {'n': 475}, 373: {'n': 307, 's': 480}, 480: {'n': 373}, 321: {'s': 413, 'e': 307}, 413: {'n': 321}, 138: {'s': 211, 'e': 131, 'w': 195}, 195: {'s': 228, 'e': 138, 'w': 225}, 228: {'n': 195, 's': 281}, 281: {'n': 228, 's': 318, 'e': 309, 'w': 317}, 309: {'s': 333, 'e': 326, 'w': 281}, 333: {'n': 309, 's': 378}, 378: {'n': 333}, 326: {'s': 342, 'w': 309}, 492: {'e': 431}, 431: {'e': 387, 'w': 492}, 387: {'n': 317, 's': 417, 'w': 431}, 417: {'n': 387}, 317: {'s': 387, 'e': 281, 'w': 409}, 318: {'n': 281, 's': 487}, 487: {'n': 318, 's': 489}, 489: {'n': 487}, 409: {'e': 317}, 225: {'s': 278, 'e': 195}, 278: {'n': 225}, 211: {'n': 138}, 226: {'s': 300, 'e': 214}, 300: {'n': 226, 's': 377, 'w': 389}, 389: {'e': 300}, 377: {'n': 300}, 102: {'s': 98, 'w': 142}, 142: {'e': 102, 'w': 159}, 159: {'e': 142, 'w': 196}, 196: {'n': 222, 'e': 159, 'w': 197}, 197: {'n': 232, 'e': 196, 'w': 276}, 232: {'n': 272, 's': 197, 'w': 235}, 272: {'n': 295, 's': 232}, 295: {'s': 272}, 235: {'n': 330, 'e': 232, 'w': 355}, 330: {'n': 369, 's': 235, 'w': 383}, 369: {'n': 400, 's': 330, 'w': 376}, 400: {'s': 369}, 376: {'e': 369}, 383: {'e': 330, 'w': 495}, 495: {'e': 383}, 355: {'e': 235}, 276: {'e': 197, 'w': 419}, 419: {'e': 276}, 222: {'n': 305, 's': 196}, 305: {'n': 365, 's': 222}, 365: {'s': 305}, 109: {'s': 185, 'e': 98, 'w': 175}, 175: {'s': 183, 'e': 109, 'w': 179}, 183: {'n': 175, 's': 229}, 229: {'n': 183, 's': 250, 'w': 236}, 250: {'n': 229, 's': 294, 'e': 289}, 289: {'w': 250}, 294: {'n': 250, 's': 334}, 334: {'n': 294, 's': 393, 'e': 341, 'w': 391}, 341: {'s': 449, 'w': 334}, 449: {'n': 341}, 391: {'s': 396, 'e': 334, 'w': 428}, 428: {'e': 391}, 396: {'n': 391}, 393: {'n': 334, 's': 482}, 482: {'n': 393}, 236: {'s': 264, 'e': 229}, 264: {'n': 236, 's': 274, 'w': 273}, 274: {'n': 264, 'w': 308}, 308: {'e': 274}, 273: {'n': 343, 'e': 264}, 343: {'s': 273, 'w': 351}, 351: {'s': 491, 'e': 343, 'w': 478}, 478: {'e': 351}, 491: {'n': 351}, 179: {'s': 233, 'e': 175, 'w': 213}, 213: {'e': 179, 'w': 420}, 420: {'s': 444, 'e': 213, 'w': 437}, 437: {'e': 420, 'w': 497}, 497: {'e': 437}, 444: {'n': 420, 'w': 490}, 490: {'e': 444, 'w': 493}, 493: {'e': 490}, 233: {'n': 179, 'w': 238}, 238: {'e': 233}, 185: {'n': 109}, 342: {'n': 326, 's': 432}, 432: {'n': 342}} + +my_dict2 = {657: {'e': 597},616: {'n': 638, 's': 620, 'e': 613, 'w': 628}, 638: {'n': 647, 's': 616}, 647: {'n': 666, 's': 638, 'w': 701}, 666: {'n': 833, 's': 647, 'e': 729, 'w': 803}, 803: {'n': 834, 'e': 666}, 834: {'n': 905, 's': 803}, 905: {'n': 977, 's': 834}, 977: {'s': 905}, 729: {'n': 731, 'w': 666}, 731: {'s': 729}, 833: {'n': 900, 's': 666}, 900: {'n': 928, 's': 833}, 928: {'s': 900}, 701: {'e': 647}, 628: {'n': 671, 'e': 616, 'w': 681}, 671: {'s': 628, 'w': 781}, 781: {'n': 787, 'e': 671}, 787: {'n': 861, 's': 781}, 861: {'n': 930, 's': 787, 'w': 862}, 862: {'n': 878, 'e': 861}, 878: {'s': 862}, 930: {'s': 861}, 681: {'e': 628, 'w': 685}, 685: {'n': 767, 's': 744, 'e': 681, 'w': 725}, 744: {'n': 685, 'w': 797}, 797: {'s': 812, 'e': 744, 'w': 807}, 812: {'n': 797, 's': 892}, 892: {'n': 812, 's': 943}, 943: {'n': 892, 'w': 952}, 952: {'e': 943}, 807: {'n': 856, 's': 864, 'e': 797, 'w': 869}, 856: {'s': 807}, 864: {'n': 807, 's': 927}, 927: {'n': 864}, 869: {'e': 807}, 725: {'e': 685}, 767: {'n': 796, 's': 685, 'w': 819}, 796: {'s': 767, 'w': 850}, 850: {'n': 954, 'e': 796, 'w': 973}, 973: {'n': 981, 'e': 850}, 981: {'s': 973}, 954: {'s': 850}, 819: {'e': 767, 'w': 893}, 893: {'e': 819, 'w': 944}, 944: {'e': 893}, 613: {'e': 575, 'w': 616}, 575: {'e': 547, 'w': 613}, 547: {'e': 537, 'w': 575}, 537: {'e': 527, 'w': 547}, 527: {'e': 516, 'w': 537}, 516: {'s': 528, 'e': 511, 'w': 527}, 597: {'s': 626, 'e': 596, 'w': 657}, 626: {'n': 597}, 596: {'n': 566, 'w': 597}, 566: {'s': 596, 'e': 562, 'w': 581}, 581: {'e': 566, 'w': 614}, 614: {'e': 581}, 562: {'e': 535, 'w': 566}, 535: {'e': 528, 'w': 562}, 528: {'n': 516, 's': 555, 'w': 535}, 555: {'n': 528}, 511: {'n': 512, 'e': 507, 'w': 516}, 507: {'n': 514, 's': 506, 'e': 518, 'w': 511}, 518: {'e': 519, 'w': 507}, 519: {'n': 563, 's': 583, 'e': 520, 'w': 518}, 563: {'s': 519}, 583: {'n': 519, 'e': 595}, 595: {'w': 583}, 520: {'n': 579, 'e': 603, 'w': 519}, 579: {'n': 601, 's': 520}, 601: {'n': 617, 's': 579, 'e': 629}, 629: {'n': 684, 'e': 667, 'w': 601}, 667: {'e': 717, 'w': 629}, 717: {'e': 820, 'w': 667}, 820: {'n': 866, 'e': 876, 'w': 717}, 866: {'s': 820}, 876: {'w': 820}, 684: {'n': 718, 's': 629, 'e': 687}, 687: {'e': 806, 'w': 684}, 806: {'n': 909, 'w': 687}, 909: {'n': 910, 's': 806, 'e': 917}, 917: {'e': 929, 'w': 909}, 929: {'w': 917}, 910: {'s': 909}, 718: {'n': 734, 's': 684, 'e': 782}, 782: {'w': 718}, 734: {'s': 718}, 617: {'n': 645, 's': 601}, 645: {'s': 617}, 603: {'n': 618, 's': 609, 'w': 520}, 609: {'n': 603, 's': 623, 'e': 652}, 623: {'n': 609, 'e': 633}, 633: {'e': 711, 'w': 623}, 711: {'n': 721, 'e': 724, 'w': 633}, 721: {'s': 711}, 724: {'n': 737, 's': 748, 'e': 728, 'w': 711}, 737: {'n': 756, 's': 724}, 756: {'s': 737, 'e': 868}, 868: {'n': 885, 'w': 756}, 885: {'s': 868}, 728: {'n': 741, 'e': 762, 'w': 724}, 741: {'s': 728, 'e': 793}, 793: {'n': 808, 'e': 901, 'w': 741}, 808: {'n': 821, 's': 793, 'e': 920}, 920: {'e': 946, 'w': 808}, 946: {'w': 920}, 821: {'n': 974, 's': 808, 'e': 953}, 974: {'s': 821}, 953: {'w': 821}, 901: {'w': 793}, 762: {'e': 874, 'w': 728}, 874: {'e': 902, 'w': 762}, 902: {'e': 956, 'w': 874}, 956: {'e': 960, 'w': 902}, 960: {'e': 966, 'w': 956}, 966: {'e': 992, 'w': 960}, 992: {'w': 966}, 748: {'n': 724, 's': 772, 'e': 764}, 764: {'s': 769, 'e': 848, 'w': 748}, 848: {'e': 853, 'w': 764}, 853: {'s': 958, 'e': 939, 'w': 848}, 939: {'w': 853}, 958: {'n': 853, 's': 972}, 972: {'n': 958}, 769: {'n': 764, 's': 799, 'e': 847}, 847: {'w': 769}, 799: {'n': 769, 'e': 908}, 908: {'w': 799}, 772: {'n': 748, 's': 780}, 780: {'n': 772, 's': 818}, 818: {'n': 780, 's': 877, 'e': 829}, 829: {'e': 912, 'w': 818}, 912: {'w': 829}, 877: {'n': 818, 's': 997, 'e': 937}, 937: {'w': 877}, 997: {'n': 877}, 652: {'w': 609}, 618: {'s': 603, 'e': 631}, 631: {'s': 646, 'w': 618}, 646: {'n': 631, 'e': 662}, 662: {'n': 675, 'w': 646}, 675: {'s': 662, 'e': 768}, 768: {'w': 675}, 514: {'n': 521, 's': 507, 'e': 515}, 515: {'n': 576, 'w': 514}, 576: {'n': 582, 's': 515, 'e': 578}, 582: {'n': 642, 's': 576, 'e': 644}, 642: {'s': 582}, 644: {'n': 664, 'w': 582}, 664: {'n': 680, 's': 644}, 680: {'s': 664}, 578: {'w': 576}, 521: {'n': 522, 's': 514}, 522: {'n': 536, 's': 521}, 536: {'n': 658, 's': 522}, 658: {'n': 678, 's': 536, 'e': 672}, 672: {'w': 658}, 678: {'s': 658, 'e': 703}, 703: {'n': 709, 'e': 733, 'w': 678}, 709: {'n': 736, 's': 703, 'e': 712}, 736: {'s': 709, 'e': 786}, 786: {'n': 798, 'e': 961, 'w': 736}, 798: {'n': 889, 's': 786}, 889: {'n': 919, 's': 798, 'e': 923, 'w': 915}, 923: {'w': 889}, 919: {'s': 889}, 915: {'e': 889}, 961: {'w': 786}, 712: {'e': 739, 'w': 709}, 739: {'w': 712}, 733: {'e': 740, 'w': 703}, 740: {'s': 770, 'e': 751, 'w': 733}, 770: {'n': 740}, 751: {'n': 810, 'e': 794, 'w': 740}, 810: {'s': 751}, 794: {'n': 802, 's': 896, 'e': 841, 'w': 751}, 841: {'e': 962, 'w': 794}, 962: {'s': 963, 'w': 841}, 963: {'n': 962, 'e': 982}, 982: {'n': 995, 'w': 963}, 995: {'s': 982, 'e': 996}, 996: {'w': 995}, 896: {'n': 794}, 802: {'n': 830, 's': 794, 'e': 865}, 830: {'s': 802}, 865: {'n': 924, 'e': 897, 'w': 802}, 924: {'s': 865, 'e': 979}, 979: {'w': 924}, 897: {'e': 986, 'w': 865}, 986: {'w': 897}, 506: {'n': 507, 's': 504, 'e': 531, 'w': 529}, 531: {'w': 506}, 504: {'n': 506, 's': 500, 'e': 544, 'w': 523}, 500: {'n': 504, 's': 502, 'e': 503, 'w': 501}, 503: {'w': 500}, 502: {'n': 500, 's': 508, 'e': 505, 'w': 509}, 508: {'n': 502, 's': 561}, 561: {'n': 508, 's': 571}, 571: {'n': 561, 's': 584}, 584: {'n': 571, 's': 669}, 669: {'n': 584, 's': 695}, 695: {'n': 669, 's': 757, 'e': 696}, 757: {'n': 695, 's': 814}, 814: {'n': 757, 's': 849}, 849: {'n': 814, 'e': 955}, 955: {'w': 849}, 696: {'s': 753, 'w': 695}, 753: {'n': 696, 's': 784, 'e': 775}, 784: {'n': 753}, 775: {'s': 823, 'e': 790, 'w': 753}, 790: {'e': 835, 'w': 775}, 835: {'e': 883, 'w': 790}, 883: {'s': 890, 'e': 891, 'w': 835}, 890: {'n': 883, 'w': 926}, 926: {'e': 890}, 891: {'s': 969, 'w': 883}, 969: {'n': 891, 'e': 984}, 984: {'w': 969}, 823: {'n': 775, 'e': 824}, 824: {'s': 827, 'w': 823}, 827: {'n': 824, 's': 832, 'e': 904, 'w': 985}, 832: {'n': 827, 's': 932, 'e': 844, 'w': 888}, 888: {'e': 832, 'w': 936}, 936: {'s': 988, 'e': 888}, 988: {'n': 936}, 932: {'n': 832, 'e': 950}, 950: {'w': 932}, 844: {'w': 832}, 985: {'e': 827}, 904: {'e': 976, 'w': 827}, 976: {'w': 904}, 505: {'e': 525, 'w': 502}, 525: {'n': 560, 's': 542, 'e': 533, 'w': 505}, 542: {'n': 525, 's': 549, 'w': 554}, 554: {'s': 567, 'e': 542}, 567: {'n': 554, 's': 574}, 574: {'n': 567, 's': 588}, 588: {'n': 574}, 549: {'n': 542, 's': 556}, 556: {'n': 549, 's': 600, 'e': 598}, 600: {'n': 556, 's': 648, 'e': 610}, 648: {'n': 600, 's': 735, 'w': 673}, 673: {'e': 648}, 735: {'n': 648}, 610: {'s': 732, 'w': 600}, 732: {'n': 610, 's': 779}, 779: {'n': 732}, 598: {'e': 659, 'w': 556}, 659: {'s': 665, 'e': 754, 'w': 598}, 754: {'w': 659}, 665: {'n': 659, 's': 723, 'e': 700}, 700: {'s': 813, 'w': 665}, 813: {'n': 700, 's': 831, 'e': 858}, 831: {'n': 813}, 858: {'s': 907, 'e': 879, 'w': 813}, 907: {'n': 858, 'e': 925}, 925: {'s': 965, 'w': 907}, 965: {'n': 925, 'e': 980}, 980: {'s': 999, 'w': 965}, 999: {'n': 980}, 879: {'w': 858}, 723: {'n': 665, 's': 816}, 816: {'n': 723}, 533: {'s': 539, 'w': 525}, 539: {'n': 533, 's': 540}, 540: {'n': 539, 'e': 585}, 585: {'e': 682, 'w': 540}, 682: {'w': 585}, 560: {'s': 525, 'e': 602}, 602: {'e': 612, 'w': 560}, 612: {'s': 637, 'e': 635, 'w': 602}, 635: {'e': 720, 'w': 612}, 720: {'w': 635}, 637: {'n': 612, 's': 651, 'e': 650}, 650: {'e': 758, 'w': 637}, 758: {'w': 650}, 651: {'n': 637, 'e': 674}, 674: {'e': 778, 'w': 651}, 778: {'s': 815, 'w': 674}, 815: {'n': 778, 's': 825}, 825: {'n': 815, 's': 854}, 854: {'n': 825}, 509: {'s': 524, 'e': 502, 'w': 510}, 510: {'n': 517, 'e': 509, 'w': 513}, 517: {'s': 510}, 513: {'n': 550, 'e': 510, 'w': 532}, 532: {'n': 553, 'e': 513, 'w': 568}, 553: {'n': 593, 's': 532}, 593: {'s': 553}, 568: {'n': 573, 'e': 532, 'w': 580}, 580: {'e': 568, 'w': 606}, 606: {'s': 608, 'e': 580, 'w': 722}, 722: {'e': 606, 'w': 763}, 763: {'s': 826, 'e': 722, 'w': 846}, 846: {'e': 763}, 826: {'n': 763}, 608: {'n': 606, 'w': 752}, 752: {'e': 608}, 573: {'s': 568}, 550: {'n': 570, 's': 513}, 570: {'s': 550}, 524: {'n': 509, 's': 545, 'w': 526}, 545: {'n': 524, 's': 565}, 565: {'n': 545, 's': 590}, 590: {'n': 565, 's': 625}, 625: {'n': 590, 's': 699}, 699: {'n': 625, 's': 809}, 809: {'n': 699}, 526: {'s': 538, 'e': 524, 'w': 530}, 530: {'s': 577, 'e': 526, 'w': 559}, 577: {'n': 530, 's': 589}, 589: {'n': 577}, 559: {'s': 572, 'e': 530, 'w': 569}, 569: {'e': 559, 'w': 615}, 615: {'e': 569}, 572: {'n': 559, 's': 621, 'w': 607}, 621: {'n': 572, 's': 634}, 634: {'n': 621, 's': 639, 'w': 636}, 639: {'n': 634, 's': 653, 'w': 702}, 653: {'n': 639, 's': 661, 'w': 690}, 661: {'n': 653, 'w': 788}, 788: {'e': 661, 'w': 867}, 867: {'e': 788, 'w': 881}, 881: {'s': 898, 'e': 867, 'w': 884}, 898: {'n': 881}, 884: {'e': 881}, 690: {'e': 653, 'w': 817}, 817: {'e': 690}, 702: {'e': 639, 'w': 715}, 715: {'e': 702, 'w': 791}, 791: {'s': 855, 'e': 715, 'w': 852}, 855: {'n': 791}, 852: {'s': 903, 'e': 791, 'w': 978}, 978: {'e': 852}, 903: {'n': 852, 'w': 951}, 951: {'e': 903}, 636: {'e': 634}, 607: {'s': 640, 'e': 572, 'w': 630}, 640: {'n': 607, 'w': 693}, 693: {'s': 694, 'e': 640, 'w': 765}, 765: {'s': 870, 'e': 693}, 870: {'n': 765, 'w': 882}, 882: {'e': 870}, 694: {'n': 693}, 630: {'e': 607, 'w': 755}, 755: {'e': 630, 'w': 766}, 766: {'s': 931, 'e': 755, 'w': 857}, 857: {'s': 875, 'e': 766, 'w': 918}, 875: {'n': 857, 's': 989}, 989: {'n': 875}, 918: {'n': 933, 'e': 857, 'w': 994}, 994: {'e': 918}, 933: {'s': 918}, 931: {'n': 766}, 538: {'n': 526, 's': 564}, 564: {'n': 538, 's': 586}, 586: {'n': 564, 's': 619, 'w': 599}, 619: {'n': 586, 's': 670}, 670: {'n': 619, 's': 707}, 707: {'n': 670, 's': 719}, 719: {'n': 707, 's': 749, 'e': 800}, 749: {'n': 719, 's': 859, 'e': 822}, 822: {'s': 872, 'w': 749}, 872: {'n': 822, 's': 906, 'e': 968}, 968: {'w': 872}, 906: {'n': 872}, 859: {'n': 749, 's': 938}, 938: {'n': 859, 's': 975}, 975: {'n': 938, 's': 983}, 983: {'n': 975}, 800: {'w': 719}, 599: {'s': 632, 'e': 586}, 632: {'n': 599, 's': 654}, 654: {'n': 632, 's': 677}, 677: {'n': 654, 's': 691}, 691: {'n': 677, 's': 716, 'w': 704}, 704: {'e': 691, 'w': 774}, 774: {'e': 704, 'w': 842}, 842: {'e': 774}, 716: {'n': 691, 's': 836, 'w': 761}, 761: {'s': 863, 'e': 716, 'w': 837}, 837: {'e': 761, 'w': 948}, 948: {'e': 837, 'w': 998}, 998: {'e': 948}, 863: {'n': 761, 's': 913, 'w': 873}, 873: {'s': 914, 'e': 863, 'w': 899}, 914: {'n': 873}, 899: {'e': 873}, 913: {'n': 863, 's': 922}, 922: {'n': 913, 's': 964, 'w': 959}, 959: {'e': 922}, 964: {'n': 922}, 836: {'n': 716, 's': 860}, 860: {'n': 836, 's': 941}, 941: {'n': 860, 's': 947}, 947: {'n': 941}, 501: {'e': 500}, 523: {'e': 504}, 544: {'e': 552, 'w': 504}, 552: {'e': 604, 'w': 544}, 604: {'w': 552}, 529: {'e': 506}, 512: {'n': 534, 's': 511, 'w': 541}, 541: {'n': 543, 'e': 512, 'w': 546}, 546: {'n': 557, 'e': 541, 'w': 548}, 557: {'s': 546}, 548: {'n': 655, 'e': 546, 'w': 605}, 605: {'n': 679, 'e': 548, 'w': 611}, 679: {'s': 605}, 611: {'n': 656, 'e': 605, 'w': 624}, 624: {'n': 689, 'e': 611}, 689: {'s': 624}, 656: {'n': 727, 's': 611}, 727: {'n': 759, 's': 656}, 759: {'n': 880, 's': 727}, 880: {'s': 759, 'w': 886}, 886: {'e': 880}, 655: {'s': 548}, 543: {'s': 541}, 534: {'n': 551, 's': 512}, 551: {'n': 591, 's': 534, 'w': 558}, 558: {'e': 551, 'w': 587}, 587: {'n': 594, 'e': 558, 'w': 592}, 594: {'n': 649, 's': 587, 'e': 622, 'w': 641}, 622: {'w': 594}, 649: {'s': 594}, 641: {'n': 663, 'e': 594, 'w': 683}, 663: {'s': 641}, 683: {'n': 713, 'e': 641}, 713: {'n': 747, 's': 683}, 747: {'n': 839, 's': 713, 'w': 828}, 839: {'s': 747, 'w': 911}, 911: {'e': 839, 'w': 921}, 921: {'e': 911, 'w': 990}, 990: {'e': 921, 'w': 991}, 991: {'e': 990}, 828: {'e': 747}, 592: {'e': 587, 'w': 697}, 697: {'e': 592}, 591: {'n': 627, 's': 551}, 627: {'n': 643, 's': 591}, 643: {'n': 676, 's': 627, 'w': 668}, 668: {'n': 706, 's': 738, 'e': 643, 'w': 688}, 706: {'n': 743, 's': 668}, 743: {'n': 760, 's': 706, 'w': 750}, 750: {'n': 776, 'e': 743, 'w': 840}, 840: {'e': 750, 'w': 887}, 887: {'e': 840, 'w': 949}, 949: {'e': 887}, 776: {'n': 777, 's': 750, 'w': 805}, 805: {'e': 776, 'w': 838}, 838: {'n': 851, 'e': 805, 'w': 845}, 845: {'n': 895, 'e': 838}, 895: {'s': 845, 'w': 916}, 916: {'s': 993, 'e': 895, 'w': 987}, 987: {'e': 916}, 993: {'n': 916}, 851: {'n': 940, 's': 838}, 940: {'s': 851}, 777: {'s': 776, 'e': 785, 'w': 894}, 894: {'n': 935, 'e': 777}, 935: {'n': 957, 's': 894}, 957: {'s': 935}, 785: {'w': 777}, 760: {'s': 743}, 738: {'n': 668}, 688: {'n': 745, 'e': 668, 'w': 730}, 745: {'s': 688, 'w': 792}, 792: {'e': 745}, 730: {'e': 688}, 676: {'n': 726, 's': 643, 'e': 686}, 686: {'w': 676}, 726: {'n': 773, 's': 676, 'e': 746}, 746: {'n': 771, 'w': 726}, 771: {'s': 746, 'e': 801}, 801: {'w': 771}, 773: {'n': 789, 's': 726}, 789: {'s': 773, 'e': 795}, 795: {'n': 804, 'w': 789}, 804: {'n': 971, 's': 795, 'e': 970, 'w': 811}, 811: {'e': 804, 'w': 934}, 934: {'n': 945, 'e': 811}, 945: {'n': 967, 's': 934}, 967: {'s': 945}, 971: {'s': 804}, 970: {'w': 804}, 620: {'n': 616, 's': 660, 'w': 692}, 692: {'s': 698, 'e': 620, 'w': 710}, 698: {'n': 692, 's': 714, 'w': 742}, 742: {'e': 698, 'w': 843}, 843: {'e': 742}, 714: {'n': 698, 'w': 783}, 783: {'e': 714, 'w': 871}, 871: {'s': 942, 'e': 783}, 942: {'n': 871}, 710: {'e': 692}, 660: {'n': 620}} + +my_dict = {**my_dict1, **my_dict2} \ No newline at end of file diff --git a/move_sell_pray/room_info.txt b/move_sell_pray/room_info.txt new file mode 100644 index 00000000..944305f0 --- /dev/null +++ b/move_sell_pray/room_info.txt @@ -0,0 +1 @@ +{15: {'room_id': 15, 'title': 'JKMT Donuts', 'description': "A glass display case separates you from fried, yummy goodness. Behind the stacks of pink boxes, you hear a worker yelling. A sign reads, 'Donuts for sale!'", 'coordinates': '(63,60)', 'elevation': 0, 'terrain': 'NORMAL', 'players': ['matthewJAM'], 'items': [], 'exits': ['w'], 'cooldown': 1.0, 'errors': [], 'messages': [], 'exit_id': {'w': 514}}, 514: {'room_id': 514, 'title': 'Darkness', 'description': 'You are standing on grass and surrounded by darkness.', 'coordinates': '(60,64)', 'elevation': 0, 'terrain': 'NORMAL', 'players': [], 'items': [], 'exits': ['n', 's', 'e'], 'cooldown': 13.5, 'errors': [], 'messages': ['You have flown west.', 'Flight Bonus: -10% CD', 'Foolish Explorer: +50% CD'], 'exit_id': {'n': '?', 's': '?', 'e': 15}}} \ No newline at end of file diff --git a/move_sell_pray/room_info2.txt b/move_sell_pray/room_info2.txt new file mode 100644 index 00000000..288214a7 --- /dev/null +++ b/move_sell_pray/room_info2.txt @@ -0,0 +1 @@ +{509: {'room_id': 509, 'title': 'Darkness', 'description': 'You are standing on grass and surrounded by darkness.', 'coordinates': '(59,59)', 'elevation': 0, 'terrain': 'NORMAL', 'players': [], 'items': [], 'exits': ['s', 'e', 'w'], 'cooldown': 1.0, 'errors': [], 'messages': [], 'exit_id': {'s': '?', 'e': 502, 'w': '?'}}, 502: {'room_id': 502, 'title': 'Darkness', 'description': 'You are standing on grass and surrounded by darkness.', 'coordinates': '(60,59)', 'elevation': 0, 'terrain': 'NORMAL', 'players': [], 'items': ['tiny treasure', 'tiny treasure', 'tiny treasure', 'tiny treasure', 'tiny treasure', 'tiny treasure', 'shiny treasure', 'shiny treasure', 'shiny treasure', 'shiny treasure', 'tiny treasure', 'shiny treasure', 'tiny treasure', 'tiny treasure', 'tiny treasure'], 'exits': ['n', 's', 'e', 'w'], 'cooldown': 4.5, 'errors': [], 'messages': ['You have flown east.', 'Flight Bonus: -10% CD', 'Wise Explorer: -50% CD'], 'exit_id': {'n': '?', 's': '?', 'e': '?', 'w': 509}}} \ No newline at end of file diff --git a/move_sell_pray/server.py b/move_sell_pray/server.py new file mode 100644 index 00000000..5352a884 --- /dev/null +++ b/move_sell_pray/server.py @@ -0,0 +1,27 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +import zmq +from cpu import CPU +from mine import valid_proof, proof_of_work +import itertools + + + +context = zmq.Context() +socket = context.socket(zmq.REP) +socket.bind("tcp://*:5555") +while True: + message = socket.recv() + room = open("snitch_room.txt","r").readline() + # print(f.readline()) + socket.send_string(room) \ No newline at end of file diff --git a/move_sell_pray/snitch_room.txt b/move_sell_pray/snitch_room.txt new file mode 100644 index 00000000..cf1f16df --- /dev/null +++ b/move_sell_pray/snitch_room.txt @@ -0,0 +1,5 @@ +<<<<<<< HEAD +736 +======= +948 +>>>>>>> 02f8fdb04ec09644be84d180ae36534e0ba3b751 diff --git a/move_sell_pray/solo_bot.py b/move_sell_pray/solo_bot.py new file mode 100644 index 00000000..f65e27e8 --- /dev/null +++ b/move_sell_pray/solo_bot.py @@ -0,0 +1,717 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + if 'cooldown' in response: + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + else: + response = requests.get(url + '/api/adv/init/', headers=headers) + response = response.json() + print(response) + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + +# curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' #6a879ef0d8d6851f96f1d1144cd3836007c07225 474a89c17aebf1820255565c58db9f9b2e2893f1 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False +response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() +print(response_status) +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + if response_status['encumbrance']: + encumbrance = response_status['encumbrance'] + else: + encumbrance = 0 + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20679' +shrined = [0,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + # next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + next_room = requests.post(url + '/api/adv/move/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + response_sell = {} + # if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + # sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + next_room = requests.post(url + '/api/adv/move/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[WillH]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + next_room = requests.post(url + '/api/adv/move/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + # print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_mine(curr_id, wishing_well=55, alternative=False): + if alternative == False: + new_room_id = dash_fly(curr_id, wishing_well) + else: + pass + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + mine_room = ls8.run() + mine_room = int(mine_room.replace(" ","")) + print('=================== Going to mine ===================') + mine_room = dash_fly(new_room_id, mine_room) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + cooldown_func(mine_response) + print('================ Mined new coin ===============') + print(mine_response) + + return mine_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + destination = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + t = "" + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + curr_id = response['room_id'] + print(response) + return curr_id + +def force_go(curr_id, destination): + + + destination = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify', 'take', 'pray', 'buy']: + if cmds[0] == 'pray': + pray_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers).json() + print(pray_response) + if cmds[0] == 'buy': + t = cmds[1] + if len(cmds[:]) > 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[:]) > 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + # {"name":"donut", "confirm":"yes"} + data = '{"name":"' + str(t) +'", "confirm":"yes"}' + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + else: + t = cmds[1] + if len(cmds[:]) > 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[:]) > 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0].isnumeric(): + curr_room = destination + destination = int(cmds[0]) + destination = force_go(curr_room, destination) + + elif cmds[0] == 'title': + t = "" + if len(cmds[1:]) > 1: + t = cmds[1] + " " + cmds[2] + elif len(cmds[1:]) > 2: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + elif len(cmds[1:]) > 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3]+ " " + cmds[4] + + data = '{"title":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + + elif cmds[0] == "q": + break + + return destination + + +def go_to_wishing_well_snitch(curr_id, wishing_well=55, alternative=False): + new_room_id = dash_fly(curr_id, wishing_well) + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + print('=================== Going to to get snitch ===================') + snitch_room = dash_fly(new_room_id, snitch_room) + + data = '{"name":"golden snitch"}' + + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + + + cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + + return snitch_room + +curr_id = response['room_id'] +if curr_id > 500: + wrapped = True +else: + wrapped = False + +force = 986 # <---------------- CHANGE to room +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + # sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + # force go to: + if force != False: + if (force > 500) & (wrapped == False): + curr_id = warp() + wrapped = False + elif (force < 500) & (wrapped == True): + curr_id = warp() + wrapped = False + + print(f'============= Forced to go to {force} =============') + curr_id = force_go(curr_id, force) + + # Share and Enjoy + + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + print(f'Encumbrance and stength: {encumbrance}, {strength}') + if ((strength - encumbrance) <= 2 | (encumbrance == strength)) & (name == Initial_name): + print('=========Going to the shop===========\n') + + sold, curr_id = go_to_shop(curr_id, inventory, shop=1, come_back=False) + + # Change Name + elif (gold >= 1000) & (name == Initial_name): + print('=========Going to the see pirate Ry===========\n') + curr_id = go_to_pirate(curr_id) + # Pray + elif ('pray' in abilities) & (len(abilities) != 5): + print('==============Going to Pray================') + curr_id = go_to_shrine(curr_id) + + elif (has_mined == True) & (name != Initial_name): + print('=============== lets wish and mine =============') + curr_id = go_to_wishing_well_mine(curr_id) + + # Wear stuff + elif ((armor == '') | (shoes == '')) & (has_mined == True): + curr_id = go_to_transmogrifier(curr_id) + + elif (wrapped == True) & (has_mined == True): + curr_id = warp() + wrapped = False + + elif (wrapped == True) & (has_mined == False): + print('========================= Getting that snitch ==================') + while True: + curr_id = go_to_wishing_well_snitch(curr_id, wishing_well=555) + + + + + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id] = {} + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + if 'fly' in abilities: + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + else: + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/move/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + + if (len(next_room['items']) > 0): + weights = [] + + for i in next_room['items']: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + + + if (encumbrance + response_examin['weight']) < strength: + name_item = i + + data_items = '{"name":"' + name_item + '"}' + + response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data_items).json() + print('Picked up item\n') + cooldown_func(response_items) + encumbrance += response_examin['weight'] + inventory.append(name_item) + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + if next_move != None: + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + # next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/move/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while moving: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/solo_bot_2.py b/move_sell_pray/solo_bot_2.py new file mode 100644 index 00000000..92466d9d --- /dev/null +++ b/move_sell_pray/solo_bot_2.py @@ -0,0 +1,618 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + +# curl -X POST -H 'Authorization: Token 474a89c17aebf1820255565c58db9f9b2e2893f1' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token 474a89c17aebf1820255565c58db9f9b2e2893f1' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + if response_status['encumbrance']: + encumbrance = response_status['encumbrance'] + else: + encumbrance = 0 + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20646' +shrined = [1,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[WillH]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_mine(curr_id, wishing_well=55, alternative=False): + if alternative == False: + new_room_id = dash_fly(curr_id, wishing_well) + else: + pass + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + mine_room = ls8.run() + mine_room = int(mine_room.replace(" ","")) + print('=================== Going to mine ===================') + mine_room = dash_fly(new_room_id, mine_room) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + cooldown_func(mine_response) + print('================ Mined new coin ===============') + print(mine_response) + + return mine_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + destination = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + curr_id = response['room_id'] + print(response) + return curr_id + +def go_to_wishing_well_snitch(curr_id, wishing_well=55, alternative=False): + new_room_id = dash_fly(curr_id, wishing_well) + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + print('=================== Going to to get snitch ===================') + snitch_room = dash_fly(new_room_id, snitch_room) + + data = '{"name":"golden snitch"}' + + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + + + cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + + return snitch_room + +curr_id = response['room_id'] +if curr_id > 500: + wrapped = True +else: + wrapped = False +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + # sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + print(f'Encumbrance and stength: {encumbrance}, {strength}, {name}, {Initial_name}') + if ((strength - encumbrance) <= 2 | (encumbrance == strength)) & (name == Initial_name): + print('=========Going to the shop===========\n') + + sold, curr_id = go_to_shop(curr_id, inventory, shop=1, come_back=False) + + # Change Name + elif (gold >= 1000) & (name == Initial_name): + print('=========Going to the see pirate Ry===========\n') + curr_id = go_to_pirate(curr_id) + # Pray + elif ('pray' in abilities) & (len(abilities) != 5): + print('==============Going to Pray================') + curr_id = go_to_shrine(curr_id) + + elif (has_mined == False) & (name != Initial_name): + print('=============== lets wish and mine =============') + curr_id = go_to_wishing_well_mine(curr_id) + + # Wear stuff + elif ((armor == None) | (shoes == None)) & (has_mined == True): + curr_id = go_to_transmogrifier(curr_id) + + elif (wrapped == False) & (has_mined == True): + curr_id = warp() + wrapped = True + + elif wrapped == True: + print('========================= Getting that snitch ==================') + while True: + curr_id = go_to_wishing_well_snitch(curr_id, wishing_well=555) + + + + + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + if 'fly' in abilities: + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + else: + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/move/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + + if (len(next_room['items']) > 0): + weights = [] + + for i in next_room['items']: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + + if "{}" not in response_examin['attributes']: + if (encumbrance + response_examin['weight']) < strength: + name_item = i + + data_items = '{"name":"' + name_item + '"}' + + response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data_items).json() + print('Picked up item\n') + cooldown_func(response_items) + encumbrance += response_examin['weight'] + inventory.append(name_item) + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while moving: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/stephen.py b/move_sell_pray/stephen.py new file mode 100644 index 00000000..de8a2e97 --- /dev/null +++ b/move_sell_pray/stephen.py @@ -0,0 +1,598 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + + + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + +# for i in inventory: +# data_items = '{"name":"'+ i +'"}' +# response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', +# headers=headers, data=data_items).json() +# print('Exmaning items\n') +# print(response_examin) +# cooldown_func(response_examin) +# print('================ DONE ============') + + + +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [1,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + shop = dash_fly(curr_id,shop) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_mine(curr_id, wishing_well=55): + new_room_id = dash_fly(curr_id, wishing_well) + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + mine_room = ls8.run() + mine_room = int(mine_room.replace(" ","")) + print('=================== Going to mine ===================') + mine_room = dash_fly(new_room_id, mine_room) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + cooldown_func(mine_response) + print('================ Mined new coin ===============') + print(mine_response) + + return mine_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +# def go_to_transmogrifier(curr_id, destination=495): + +# print('=================== Going to the transmogrifier ===================') +# transmogrifier_room = dash_fly(curr_id, destination) +# encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +# n = 0 +# for i in inventory: +# # if item has the word treasure sell it + +# data_items = '{"name":"'+ i +'"}' +# response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', +# headers=headers, data=data_items).json() +# print('Exmaning items\n') +# print(response_examin) +# cooldown_func(response_examin) +# print(response_examin['attributes']) + +# if "{}" not in response_examin['attributes']: + +# transmogrifier_data = '{"name":"'+i+'"}' +# transmogrifier_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/transmogrify/', +# headers=headers, data=transmogrifier_data).json() +# print(f'Item {i}\n') +# sold = True +# print(transmogrifier_response) +# cooldown_func(transmogrifier_response) + +# n += 1 +# print(n) +# encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +# for i in inventory: +# print(f'item: {i}') +# while True: +# print(inventory) +# cmds = input("-> ").lower().split(" ") +# if cmds[0] in ["examine", "wear", "undress","choose"]: +# # player.travel(cmds[0], True) +# if cmds[0] == 'choose': +# i = cmds[1] +# data = '{"name":"[' + str(i) +']"}' + +# take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', +# headers=headers, data=data).json() +# cooldown_func(take_examin) +# print(take_examin) +# elif cmds[0] == "q": +# break + +# return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + print(response) + while True: + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["n", "s", "e", "w"]: + # player.travel(cmds[0], True) + data = '{"direction":"' + cmds[0] +'"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + print(next_room) + if cmds[0] in ["examine", "take"]: + # data = '{"direction":"' + cmds[0] +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/').json() + cooldown_func(take_examin) + print(take_examin) + + elif cmds[0] == "q": + break + + +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined): + sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + if ((strength - encumbrance) <= 10 | (encumbrance == strength)) & (name == "SOMETHING ELSE"): + print('=========Going to the shop===========\n') + + sold, curr_id = go_to_shop(curr_id, inventory, shop=1, come_back=False) + if sold == True: + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + print(f'Encumbrance and stength: {encumbrance}, {strength}') + # Change Name + if (gold >= 1000) & (name == 'User 20677'): + print('=========Going to the see pirate Ry===========\n') + curr_id = go_to_pirate(curr_id) + # Pray + if ('pray' in abilities) & (len(abilities) != 5): + print('==============Going to Pray================') + curr_id = go_to_shrine(curr_id) + # Wishing Well + # if len(abilities) == 5 & ((armor == None) | (shoes == None)): + # print('=============== lets wish and mine =============') + # new_id = go_to_wishing_well_mine(curr_id) + # Wear stuff + # if ((armor == None) | (shoes == None)) & (encumbrance >= 8 ): + # curr_id = go_to_transmogrifier(curr_id) + + + + if curr_id not in visited: + visited.add(curr_id) + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + + room_exits = visited[curr_id] + known_ids = path[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + print(f'known_ids: {known_ids}') + + + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + + if (len(next_room['items']) > 0): + weights = [] + + for i in next_room['items']: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + + # if (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(response_wear) + # print(f'Wore item: {i}\n') + # # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # print(f'Armore: {armor}, Shoes: {shoes}') + if "{}" not in response_examin['attributes']: + if (encumbrance + response_examin['weight']) < strength: + name_item = i + + data_items = '{"name":"' + name_item + '"}' + + response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data_items).json() + print('Picked up item\n') + cooldown_func(response_items) + encumbrance += response_examin['weight'] + inventory.append(name_item) + # elif (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(f'Wore item: {i}\n') + # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + # if (encumbrance == strength) | (strength - encumbrance) == 1: + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while moving: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/testing.py b/move_sell_pray/testing.py new file mode 100644 index 00000000..11a1f43d --- /dev/null +++ b/move_sell_pray/testing.py @@ -0,0 +1,17 @@ +import zmq + +context = zmq.Context() + +# Socket to talk to server +print("Connecting to hello world server…") +socket = context.socket(zmq.REQ) +socket.connect("tcp://*:5555") + +# Do 10 requests, waiting each time for a response +for request in range(10): + print("Sending request %s …" % request) + socket.send(b"Hello") + + # Get the reply. + message = socket.recv() + print("Received reply %s [ %s ]" % (request, message)) \ No newline at end of file diff --git a/move_sell_pray/util.py b/move_sell_pray/util.py new file mode 100644 index 00000000..f757503f --- /dev/null +++ b/move_sell_pray/util.py @@ -0,0 +1,28 @@ + +# Note: This Queue class is sub-optimal. Why? +class Queue(): + def __init__(self): + self.queue = [] + def enqueue(self, value): + self.queue.append(value) + def dequeue(self): + if self.size() > 0: + return self.queue.pop(0) + else: + return None + def size(self): + return len(self.queue) + +class Stack(): + def __init__(self): + self.stack = [] + def push(self, value): + self.stack.append(value) + def pop(self): + if self.size() > 0: + return self.stack.pop() + else: + return None + def size(self): + return len(self.stack) + diff --git a/move_sell_pray/visited.txt b/move_sell_pray/visited.txt new file mode 100644 index 00000000..0f0d4302 --- /dev/null +++ b/move_sell_pray/visited.txt @@ -0,0 +1 @@ +{15: {'w': 514}, 143: {'e': '?', 'w': '?'}, 121: {'n': '?', 'e': '?', 'w': '?'}, 107: {'s': '?', 'e': '?', 'w': '?'}, 120: {'n': '?', 'e': '?'}, 127: {'e': '?', 'w': '?'}, 184: {'e': '?', 'w': '?'}, 221: {'s': '?', 'e': '?', 'w': '?'}, 253: {'n': '?', 'e': '?'}, 258: {'e': '?', 'w': '?'}, 306: {'e': '?', 'w': '?'}, 397: {'w': '?'}, 240: {'n': '?', 'e': '?', 'w': '?'}, 249: {'n': '?', 's': '?', 'e': '?'}, 282: {'w': '?'}, 265: {'n': '?', 's': '?', 'e': '?'}, 279: {'s': '?'}, 270: {'n': '?', 'e': '?', 'w': '?'}, 338: {'s': '?', 'w': '?'}, 379: {'n': '?', 'e': '?'}, 395: {'s': '?', 'e': '?', 'w': '?'}, 403: {'n': '?'}, 421: {'n': '?', 'w': '?'}, 440: {'s': '?', 'w': '?'}, 476: {'e': '?'}, 416: {'s': '?'}, 386: {'e': '?', 'w': '?'}, 414: {'w': '?'}, 104: {'n': '?', 'e': '?'}, 59: {'n': '?', 's': '?', 'e': '?'}, 38: {'s': '?', 'e': '?', 'w': '?'}, 66: {'n': '?', 'e': '?', 'w': '?'}, 123: {'w': '?'}, 169: {'s': '?', 'e': '?'}, 186: {'e': '?', 'w': '?'}, 205: {'s': '?', 'e': '?', 'w': '?'}, 479: {'w': '?'}, 241: {'n': '?', 'e': '?'}, 266: {'w': '?'}, 33: {'e': '?', 'w': '?'}, 31: {'n': '?', 'e': '?'}, 30: {'s': '?', 'e': '?', 'w': '?'}, 32: {'n': '?', 'e': '?', 'w': '?'}, 39: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 41: {'e': '?'}, 51: {'n': '?', 'e': '?', 'w': '?'}, 57: {'e': '?', 'w': '?'}, 145: {'n': '?', 'e': '?', 'w': '?'}, 220: {'w': '?'}, 174: {'n': '?', 's': '?', 'e': '?'}, 224: {'w': '?'}, 192: {'n': '?', 's': '?', 'e': '?'}, 223: {'n': '?', 'w': '?'}, 283: {'n': '?', 's': '?', 'e': '?'}, 313: {'w': '?'}, 331: {'s': '?', 'e': '?'}, 446: {'e': '?', 'w': '?'}, 466: {'s': '?', 'e': '?', 'w': '?'}, 486: {'n': '?'}, 472: {'w': '?'}, 201: {'s': '?'}, 69: {'n': '?', 's': '?', 'e': '?'}, 94: {'n': '?', 's': '?'}, 152: {'s': '?'}, 103: {'n': '?', 'w': '?'}, 160: {'s': '?'}, 53: {'n': '?', 's': '?', 'w': '?'}, 88: {'e': '?', 'w': '?'}, 122: {'n': '?', 'e': '?'}, 124: {'n': '?', 's': '?'}, 157: {'n': '?', 's': '?', 'w': '?'}, 182: {'e': '?', 'w': '?'}, 208: {'e': '?'}, 210: {'s': '?'}, 95: {'n': '?', 's': '?', 'w': '?'}, 119: {'n': '?', 's': '?'}, 134: {'n': '?', 's': '?', 'e': '?'}, 144: {'e': '?', 'w': '?'}, 155: {'s': '?', 'e': '?', 'w': '?'}, 187: {'n': '?'}, 316: {'n': '?', 'w': '?'}, 344: {'n': '?', 's': '?', 'e': '?'}, 392: {'s': '?', 'e': '?'}, 462: {'w': '?'}, 390: {'w': '?'}, 147: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 200: {'n': '?', 's': '?', 'e': '?'}, 227: {'n': '?', 's': '?'}, 269: {'n': '?', 's': '?'}, 319: {'n': '?', 's': '?', 'e': '?'}, 359: {'s': '?'}, 345: {'s': '?', 'w': '?'}, 375: {'n': '?', 'e': '?'}, 385: {'w': '?'}, 206: {'n': '?', 'e': '?', 'w': '?'}, 380: {'n': '?', 'w': '?'}, 424: {'s': '?', 'e': '?'}, 473: {'e': '?', 'w': '?'}, 494: {'w': '?'}, 288: {'s': '?'}, 151: {'n': '?', 'e': '?', 'w': '?'}, 207: {'n': '?', 'e': '?', 'w': '?'}, 231: {'s': '?', 'w': '?'}, 248: {'n': '?', 'e': '?', 'w': '?'}, 280: {'n': '?', 'e': '?'}, 325: {'n': '?', 's': '?', 'w': '?'}, 374: {'e': '?'}, 353: {'s': '?'}, 296: {'s': '?'}, 290: {'e': '?'}, 172: {'n': '?', 's': '?'}, 267: {'n': '?', 's': '?', 'w': '?'}, 271: {'n': '?', 'e': '?'}, 337: {'s': '?'}, 285: {'n': '?', 's': '?'}, 286: {'n': '?', 's': '?', 'w': '?'}, 291: {'n': '?', 'e': '?', 'w': '?'}, 347: {'n': '?', 's': '?', 'e': '?'}, 452: {'s': '?'}, 442: {'n': '?'}, 410: {'s': '?'}, 336: {'s': '?'}, 153: {'e': '?', 'w': '?'}, 329: {'w': '?'}, 115: {'n': '?', 'e': '?'}, 116: {'n': '?', 's': '?'}, 132: {'s': '?'}, 54: {'w': '?'}, 27: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 28: {'n': '?'}, 20: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 63: {'n': '?', 's': '?', 'w': '?'}, 73: {'e': '?'}, 72: {'s': '?', 'w': '?'}, 76: {'n': '?', 'e': '?', 'w': '?'}, 83: {'s': '?', 'e': '?', 'w': '?'}, 130: {'w': '?'}, 125: {'n': '?', 'e': '?', 'w': '?'}, 237: {'e': '?', 'w': '?'}, 245: {'s': '?', 'e': '?'}, 254: {'n': '?', 'w': '?'}, 314: {'e': '?'}, 165: {'n': '?', 's': '?', 'w': '?'}, 203: {'n': '?', 's': '?', 'e': '?'}, 299: {'e': '?', 'w': '?'}, 311: {'w': '?'}, 268: {'s': '?', 'e': '?', 'w': '?'}, 411: {'w': '?'}, 312: {'n': '?', 'e': '?'}, 328: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 332: {'n': '?', 's': '?'}, 350: {'n': '?', 's': '?', 'e': '?'}, 436: {'s': '?'}, 404: {'n': '?', 'w': '?'}, 481: {'s': '?'}, 363: {'n': '?', 'e': '?'}, 372: {'n': '?', 's': '?'}, 441: {'s': '?'}, 357: {'w': '?'}, 204: {'n': '?', 'e': '?', 'w': '?'}, 219: {'s': '?'}, 216: {'n': '?', 'e': '?', 'w': '?'}, 234: {'n': '?', 's': '?', 'w': '?'}, 252: {'n': '?', 'e': '?'}, 284: {'n': '?', 's': '?', 'w': '?'}, 303: {'n': '?', 'e': '?', 'w': '?'}, 405: {'n': '?', 'e': '?'}, 406: {'s': '?', 'w': '?'}, 415: {'e': '?', 'w': '?'}, 418: {'n': '?', 's': '?', 'e': '?'}, 474: {'n': '?'}, 425: {'s': '?', 'w': '?'}, 469: {'e': '?'}, 361: {'n': '?', 's': '?'}, 408: {'n': '?', 's': '?', 'w': '?'}, 423: {'e': '?', 'w': '?'}, 454: {'n': '?', 'e': '?'}, 470: {'s': '?'}, 458: {'s': '?', 'w': '?'}, 459: {'e': '?'}, 302: {'n': '?', 's': '?'}, 422: {'n': '?', 's': '?'}, 426: {'n': '?', 's': '?'}, 457: {'n': '?', 's': '?'}, 461: {'s': '?'}, 368: {'s': '?'}, 218: {'s': '?', 'e': '?', 'w': '?'}, 242: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 287: {'s': '?', 'w': '?'}, 339: {'e': '?', 'w': '?'}, 445: {'n': '?', 'e': '?', 'w': '?'}, 450: {'e': '?'}, 447: {'s': '?'}, 259: {'n': '?', 'w': '?'}, 310: {'e': '?', 'w': '?'}, 412: {'s': '?', 'e': '?'}, 488: {'n': '?'}, 275: {'e': '?', 'w': '?'}, 456: {'e': '?', 'w': '?'}, 499: {'e': '?'}, 263: {'n': '?'}, 110: {'e': '?'}, 19: {'n': '?', 's': '?', 'w': '?'}, 10: {'n': '?', 's': '?', 'w': '?'}, 43: {'e': '?', 'w': '?'}, 47: {'n': '?', 'e': '?'}, 71: {'s': '?'}, 0: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 1: {'e': '?'}, 4: {'n': '?', 'e': '?', 'w': '?'}, 13: {'e': '?', 'w': '?'}, 23: {'s': '?', 'e': '?'}, 26: {'e': '?', 'w': '?'}, 55: {'w': '?'}, 2: {'n': '?', 's': '?', 'e': '?'}, 3: {'s': '?', 'e': '?', 'w': '?'}, 5: {'w': '?'}, 9: {'n': '?', 's': '?', 'e': '?'}, 11: {'e': '?', 'w': '?'}, 17: {'n': '?', 'e': '?', 'w': '?'}, 24: {'s': '?'}, 42: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 44: {'s': '?'}, 80: {'n': '?', 's': '?', 'e': '?'}, 81: {'n': '?'}, 86: {'s': '?', 'e': '?', 'w': '?'}, 90: {'e': '?', 'w': '?'}, 178: {'n': '?', 'e': '?', 'w': '?'}, 209: {'s': '?'}, 243: {'s': '?', 'e': '?', 'w': '?'}, 256: {'s': '?', 'e': '?', 'w': '?'}, 327: {'e': '?', 'w': '?'}, 427: {'e': '?', 'w': '?'}, 430: {'n': '?', 'e': '?', 'w': '?'}, 439: {'w': '?'}, 443: {'s': '?', 'e': '?'}, 471: {'w': '?'}, 360: {'n': '?', 'e': '?'}, 398: {'e': '?', 'w': '?'}, 438: {'e': '?', 'w': '?'}, 465: {'e': '?', 'w': '?'}, 498: {'w': '?'}, 293: {'n': '?'}, 96: {'n': '?', 'e': '?'}, 97: {'e': '?', 'w': '?'}, 181: {'w': '?'}, 118: {'e': '?', 'w': '?'}, 137: {'w': '?'}, 12: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 14: {'s': '?', 'e': '?', 'w': '?'}, 37: {'w': '?'}, 34: {'n': '?', 's': '?', 'e': '?'}, 50: {'n': '?', 's': '?'}, 89: {'n': '?', 's': '?'}, 93: {'n': '?', 'w': '?'}, 108: {'n': '?', 's': '?', 'e': '?'}, 78: {'n': '?', 's': '?'}, 22: {'n': '?', 's': '?', 'w': '?'}, 18: {'n': '?', 's': '?', 'w': '?'}, 25: {'e': '?'}, 21: {'e': '?', 'w': '?'}, 29: {'s': '?', 'e': '?', 'w': '?'}, 49: {'s': '?', 'e': '?', 'w': '?'}, 136: {'e': '?', 'w': '?'}, 148: {'e': '?', 'w': '?'}, 292: {'n': '?', 'e': '?'}, 301: {'n': '?', 's': '?'}, 304: {'s': '?'}, 79: {'n': '?'}, 45: {'n': '?', 's': '?'}, 60: {'n': '?', 'e': '?', 'w': '?'}, 36: {'s': '?', 'e': '?', 'w': '?'}, 48: {'n': '?', 's': '?', 'w': '?'}, 105: {'n': '?', 'w': '?'}, 202: {'e': '?'}, 149: {'e': '?'}, 117: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 166: {'s': '?', 'e': '?', 'w': '?'}, 150: {'n': '?', 'w': '?'}, 135: {'s': '?', 'e': '?'}, 106: {'n': '?', 's': '?', 'w': '?'}, 111: {'n': '?', 's': '?', 'e': '?'}, 158: {'s': '?', 'w': '?'}, 167: {'n': '?', 's': '?', 'e': '?'}, 260: {'w': '?'}, 262: {'n': '?', 's': '?', 'e': '?'}, 358: {'e': '?', 'w': '?'}, 401: {'w': '?'}, 370: {'n': '?', 's': '?', 'e': '?'}, 434: {'n': '?'}, 407: {'s': '?', 'w': '?'}, 496: {'n': '?'}, 367: {'n': '?'}, 100: {'s': '?', 'e': '?', 'w': '?'}, 112: {'s': '?', 'e': '?', 'w': '?'}, 140: {'w': '?'}, 141: {'n': '?', 'e': '?'}, 156: {'s': '?', 'e': '?', 'w': '?'}, 168: {'n': '?', 'e': '?'}, 340: {'w': '?'}, 164: {'n': '?', 'e': '?', 'w': '?'}, 217: {'s': '?', 'e': '?'}, 247: {'e': '?', 'w': '?'}, 261: {'s': '?', 'e': '?', 'w': '?'}, 277: {'n': '?', 'e': '?'}, 323: {'e': '?', 'w': '?'}, 433: {'s': '?', 'e': '?', 'w': '?'}, 460: {'w': '?'}, 455: {'n': '?'}, 322: {'n': '?', 'e': '?', 'w': '?'}, 435: {'w': '?'}, 382: {'s': '?', 'e': '?'}, 388: {'e': '?', 'w': '?'}, 477: {'e': '?', 'w': '?'}, 483: {'w': '?'}, 298: {'s': '?', 'w': '?'}, 324: {'n': '?', 's': '?', 'e': '?'}, 349: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 384: {'w': '?'}, 352: {'n': '?', 's': '?', 'e': '?'}, 485: {'w': '?'}, 362: {'n': '?', 's': '?', 'w': '?'}, 399: {'n': '?', 's': '?'}, 467: {'n': '?'}, 463: {'s': '?', 'e': '?'}, 468: {'n': '?'}, 356: {'e': '?'}, 354: {'w': '?'}, 68: {'n': '?', 'e': '?'}, 52: {'n': '?', 's': '?', 'e': '?'}, 75: {'e': '?', 'w': '?'}, 85: {'e': '?', 'w': '?'}, 154: {'e': '?', 'w': '?'}, 193: {'e': '?', 'w': '?'}, 251: {'e': '?', 'w': '?'}, 315: {'w': '?'}, 35: {'s': '?', 'w': '?'}, 6: {'n': '?', 'w': '?'}, 7: {'n': '?', 'e': '?', 'w': '?'}, 56: {'e': '?', 'w': '?'}, 61: {'e': '?', 'w': '?'}, 171: {'e': '?'}, 8: {'s': '?', 'w': '?'}, 16: {'n': '?', 'e': '?', 'w': '?'}, 58: {'s': '?', 'w': '?'}, 65: {'n': '?', 'e': '?', 'w': '?'}, 74: {'n': '?', 's': '?', 'w': '?'}, 161: {'e': '?'}, 87: {'s': '?'}, 139: {'e': '?', 'w': '?'}, 188: {'e': '?', 'w': '?'}, 335: {'e': '?', 'w': '?'}, 366: {'e': '?'}, 67: {'e': '?', 'w': '?'}, 162: {'e': '?'}, 77: {'e': '?'}, 46: {'e': '?', 'w': '?'}, 62: {'n': '?', 'e': '?', 'w': '?'}, 84: {'e': '?', 'w': '?'}, 91: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 101: {'n': '?', 'w': '?'}, 113: {'s': '?', 'e': '?'}, 114: {'n': '?', 'w': '?'}, 176: {'e': '?', 'w': '?'}, 402: {'e': '?', 'w': '?'}, 451: {'e': '?', 'w': '?'}, 453: {'s': '?', 'e': '?'}, 464: {'n': '?'}, 99: {'n': '?', 'e': '?', 'w': '?'}, 190: {'s': '?'}, 146: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 215: {'n': '?', 's': '?'}, 246: {'s': '?'}, 257: {'n': '?', 'e': '?', 'w': '?'}, 364: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 429: {'s': '?'}, 381: {'n': '?', 'w': '?'}, 394: {'e': '?'}, 448: {'e': '?'}, 320: {'n': '?', 's': '?'}, 348: {'s': '?'}, 177: {'n': '?', 'w': '?'}, 346: {'e': '?'}, 180: {'s': '?'}, 64: {'s': '?', 'w': '?'}, 82: {'n': '?', 'e': '?'}, 191: {'s': '?'}, 40: {'s': '?'}, 92: {'w': '?'}, 128: {'s': '?', 'e': '?'}, 189: {'e': '?', 'w': '?'}, 255: {'w': '?'}, 212: {'w': '?'}, 70: {'s': '?', 'e': '?', 'w': '?'}, 163: {'n': '?'}, 98: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 126: {'n': '?', 's': '?'}, 129: {'n': '?', 'e': '?', 'w': '?'}, 170: {'e': '?'}, 194: {'s': '?', 'w': '?'}, 214: {'n': '?', 'e': '?', 'w': '?'}, 173: {'e': '?', 'w': '?'}, 133: {'e': '?', 'w': '?'}, 131: {'n': '?', 's': '?', 'w': '?'}, 244: {'n': '?', 'e': '?'}, 239: {'n': '?', 'w': '?'}, 198: {'n': '?', 's': '?', 'e': '?'}, 199: {'s': '?', 'w': '?'}, 230: {'n': '?', 's': '?', 'e': '?'}, 297: {'w': '?'}, 307: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 371: {'s': '?', 'w': '?'}, 475: {'n': '?', 's': '?'}, 484: {'n': '?'}, 373: {'n': '?', 's': '?'}, 480: {'n': '?'}, 321: {'s': '?', 'e': '?'}, 413: {'n': '?'}, 138: {'s': '?', 'e': '?', 'w': '?'}, 195: {'s': '?', 'e': '?', 'w': '?'}, 228: {'n': '?', 's': '?'}, 281: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 309: {'s': '?', 'e': '?', 'w': '?'}, 333: {'n': '?', 's': '?'}, 378: {'n': '?'}, 326: {'s': '?', 'w': '?'}, 492: {'e': '?'}, 431: {'e': '?', 'w': '?'}, 387: {'n': '?', 's': '?', 'w': '?'}, 417: {'n': '?'}, 317: {'s': '?', 'e': '?', 'w': '?'}, 318: {'n': '?', 's': '?'}, 487: {'n': '?', 's': '?'}, 489: {'n': '?'}, 409: {'e': '?'}, 225: {'s': '?', 'e': '?'}, 278: {'n': '?'}, 211: {'n': '?'}, 226: {'s': '?', 'e': '?'}, 300: {'n': '?', 's': '?', 'w': '?'}, 389: {'e': '?'}, 377: {'n': '?'}, 102: {'s': '?', 'w': '?'}, 142: {'e': '?', 'w': '?'}, 159: {'e': '?', 'w': '?'}, 196: {'n': '?', 'e': '?', 'w': '?'}, 197: {'n': '?', 'e': '?', 'w': '?'}, 232: {'n': '?', 's': '?', 'w': '?'}, 272: {'n': '?', 's': '?'}, 295: {'s': '?'}, 235: {'n': '?', 'e': '?', 'w': '?'}, 330: {'n': '?', 's': '?', 'w': '?'}, 369: {'n': '?', 's': '?', 'w': '?'}, 400: {'s': '?'}, 376: {'e': '?'}, 383: {'e': '?', 'w': '?'}, 495: {'e': '?'}, 355: {'e': '?'}, 276: {'e': '?', 'w': '?'}, 419: {'e': '?'}, 222: {'n': '?', 's': '?'}, 305: {'n': '?', 's': '?'}, 365: {'s': '?'}, 109: {'s': '?', 'e': '?', 'w': '?'}, 175: {'s': '?', 'e': '?', 'w': '?'}, 183: {'n': '?', 's': '?'}, 229: {'n': '?', 's': '?', 'w': '?'}, 250: {'n': '?', 's': '?', 'e': '?'}, 289: {'w': '?'}, 294: {'n': '?', 's': '?'}, 334: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 341: {'s': '?', 'w': '?'}, 449: {'n': '?'}, 391: {'s': '?', 'e': '?', 'w': '?'}, 428: {'e': '?'}, 396: {'n': '?'}, 393: {'n': '?', 's': '?'}, 482: {'n': '?'}, 236: {'s': '?', 'e': '?'}, 264: {'n': '?', 's': '?', 'w': '?'}, 274: {'n': '?', 'w': '?'}, 308: {'e': '?'}, 273: {'n': '?', 'e': '?'}, 343: {'s': '?', 'w': '?'}, 351: {'s': '?', 'e': '?', 'w': '?'}, 478: {'e': '?'}, 491: {'n': '?'}, 179: {'s': '?', 'e': '?', 'w': '?'}, 213: {'e': '?', 'w': '?'}, 420: {'s': '?', 'e': '?', 'w': '?'}, 437: {'e': '?', 'w': '?'}, 497: {'e': '?'}, 444: {'n': '?', 'w': '?'}, 490: {'e': '?', 'w': '?'}, 493: {'e': '?'}, 233: {'n': '?', 'w': '?'}, 238: {'e': '?'}, 185: {'n': '?'}, 342: {'n': '?', 's': '?'}, 432: {'n': '?'}, 657: {'e': '?'}, 616: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 638: {'n': '?', 's': '?'}, 647: {'n': '?', 's': '?', 'w': '?'}, 666: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 803: {'n': '?', 'e': '?'}, 834: {'n': '?', 's': '?'}, 905: {'n': '?', 's': '?'}, 977: {'s': '?'}, 729: {'n': '?', 'w': '?'}, 731: {'s': '?'}, 833: {'n': '?', 's': '?'}, 900: {'n': '?', 's': '?'}, 928: {'s': '?'}, 701: {'e': '?'}, 628: {'n': '?', 'e': '?', 'w': '?'}, 671: {'s': '?', 'w': '?'}, 781: {'n': '?', 'e': '?'}, 787: {'n': '?', 's': '?'}, 861: {'n': '?', 's': '?', 'w': '?'}, 862: {'n': '?', 'e': '?'}, 878: {'s': '?'}, 930: {'s': '?'}, 681: {'e': '?', 'w': '?'}, 685: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 744: {'n': '?', 'w': '?'}, 797: {'s': '?', 'e': '?', 'w': '?'}, 812: {'n': '?', 's': '?'}, 892: {'n': '?', 's': '?'}, 943: {'n': '?', 'w': '?'}, 952: {'e': '?'}, 807: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 856: {'s': '?'}, 864: {'n': '?', 's': '?'}, 927: {'n': '?'}, 869: {'e': '?'}, 725: {'e': '?'}, 767: {'n': '?', 's': '?', 'w': '?'}, 796: {'s': '?', 'w': '?'}, 850: {'n': '?', 'e': '?', 'w': '?'}, 973: {'n': '?', 'e': '?'}, 981: {'s': '?'}, 954: {'s': '?'}, 819: {'e': '?', 'w': '?'}, 893: {'e': '?', 'w': '?'}, 944: {'e': '?'}, 613: {'e': '?', 'w': '?'}, 575: {'e': '?', 'w': '?'}, 547: {'e': '?', 'w': '?'}, 537: {'e': '?', 'w': '?'}, 527: {'e': '?', 'w': '?'}, 516: {'s': '?', 'e': '?', 'w': '?'}, 597: {'s': '?', 'e': '?', 'w': '?'}, 626: {'n': '?'}, 596: {'n': '?', 'w': '?'}, 566: {'s': '?', 'e': '?', 'w': '?'}, 581: {'e': '?', 'w': '?'}, 614: {'e': '?'}, 562: {'e': '?', 'w': '?'}, 535: {'e': '?', 'w': '?'}, 528: {'n': '?', 's': '?', 'w': '?'}, 555: {'n': '?'}, 511: {'n': '?', 'e': '?', 'w': '?'}, 507: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 518: {'e': '?', 'w': '?'}, 519: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 563: {'s': '?'}, 583: {'n': '?', 'e': '?'}, 595: {'w': '?'}, 520: {'n': '?', 'e': '?', 'w': '?'}, 579: {'n': '?', 's': '?'}, 601: {'n': '?', 's': '?', 'e': '?'}, 629: {'n': '?', 'e': '?', 'w': '?'}, 667: {'e': '?', 'w': '?'}, 717: {'e': '?', 'w': '?'}, 820: {'n': '?', 'e': '?', 'w': '?'}, 866: {'s': '?'}, 876: {'w': '?'}, 684: {'n': '?', 's': '?', 'e': '?'}, 687: {'e': '?', 'w': '?'}, 806: {'n': '?', 'w': '?'}, 909: {'n': '?', 's': '?', 'e': '?'}, 917: {'e': '?', 'w': '?'}, 929: {'w': '?'}, 910: {'s': '?'}, 718: {'n': '?', 's': '?', 'e': '?'}, 782: {'w': '?'}, 734: {'s': '?'}, 617: {'n': '?', 's': '?'}, 645: {'s': '?'}, 603: {'n': '?', 's': '?', 'w': '?'}, 609: {'n': '?', 's': '?', 'e': '?'}, 623: {'n': '?', 'e': '?'}, 633: {'e': '?', 'w': '?'}, 711: {'n': '?', 'e': '?', 'w': '?'}, 721: {'s': '?'}, 724: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 737: {'n': '?', 's': '?'}, 756: {'s': '?', 'e': '?'}, 868: {'n': '?', 'w': '?'}, 885: {'s': '?'}, 728: {'n': '?', 'e': '?', 'w': '?'}, 741: {'s': '?', 'e': '?'}, 793: {'n': '?', 'e': '?', 'w': '?'}, 808: {'n': '?', 's': '?', 'e': '?'}, 920: {'e': '?', 'w': '?'}, 946: {'w': '?'}, 821: {'n': '?', 's': '?', 'e': '?'}, 974: {'s': '?'}, 953: {'w': '?'}, 901: {'w': '?'}, 762: {'e': '?', 'w': '?'}, 874: {'e': '?', 'w': '?'}, 902: {'e': '?', 'w': '?'}, 956: {'e': '?', 'w': '?'}, 960: {'e': '?', 'w': '?'}, 966: {'e': '?', 'w': '?'}, 992: {'w': '?'}, 748: {'n': '?', 's': '?', 'e': '?'}, 764: {'s': '?', 'e': '?', 'w': '?'}, 848: {'e': '?', 'w': '?'}, 853: {'s': '?', 'e': '?', 'w': '?'}, 939: {'w': '?'}, 958: {'n': '?', 's': '?'}, 972: {'n': '?'}, 769: {'n': '?', 's': '?', 'e': '?'}, 847: {'w': '?'}, 799: {'n': '?', 'e': '?'}, 908: {'w': '?'}, 772: {'n': '?', 's': '?'}, 780: {'n': '?', 's': '?'}, 818: {'n': '?', 's': '?', 'e': '?'}, 829: {'e': '?', 'w': '?'}, 912: {'w': '?'}, 877: {'n': '?', 's': '?', 'e': '?'}, 937: {'w': '?'}, 997: {'n': '?'}, 652: {'w': '?'}, 618: {'s': '?', 'e': '?'}, 631: {'s': '?', 'w': '?'}, 646: {'n': '?', 'e': '?'}, 662: {'n': '?', 'w': '?'}, 675: {'s': '?', 'e': '?'}, 768: {'w': '?'}, 514: {'n': '?', 's': '?', 'e': 15}, 515: {'n': '?', 'w': '?'}, 576: {'n': '?', 's': '?', 'e': '?'}, 582: {'n': '?', 's': '?', 'e': '?'}, 642: {'s': '?'}, 644: {'n': '?', 'w': '?'}, 664: {'n': '?', 's': '?'}, 680: {'s': '?'}, 578: {'w': '?'}, 521: {'n': '?', 's': '?'}, 522: {'n': '?', 's': '?'}, 536: {'n': '?', 's': '?'}, 658: {'n': '?', 's': '?', 'e': '?'}, 672: {'w': '?'}, 678: {'s': '?', 'e': '?'}, 703: {'n': '?', 'e': '?', 'w': '?'}, 709: {'n': '?', 's': '?', 'e': '?'}, 736: {'s': '?', 'e': '?'}, 786: {'n': '?', 'e': '?', 'w': '?'}, 798: {'n': '?', 's': '?'}, 889: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 923: {'w': '?'}, 919: {'s': '?'}, 915: {'e': '?'}, 961: {'w': '?'}, 712: {'e': '?', 'w': '?'}, 739: {'w': '?'}, 733: {'e': '?', 'w': '?'}, 740: {'s': '?', 'e': '?', 'w': '?'}, 770: {'n': '?'}, 751: {'n': '?', 'e': '?', 'w': '?'}, 810: {'s': '?'}, 794: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 841: {'e': '?', 'w': '?'}, 962: {'s': '?', 'w': '?'}, 963: {'n': '?', 'e': '?'}, 982: {'n': '?', 'w': '?'}, 995: {'s': '?', 'e': '?'}, 996: {'w': '?'}, 896: {'n': '?'}, 802: {'n': '?', 's': '?', 'e': '?'}, 830: {'s': '?'}, 865: {'n': '?', 'e': '?', 'w': '?'}, 924: {'s': '?', 'e': '?'}, 979: {'w': '?'}, 897: {'e': '?', 'w': '?'}, 986: {'w': '?'}, 506: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 531: {'w': '?'}, 504: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 500: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 503: {'w': '?'}, 502: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 508: {'n': '?', 's': '?'}, 561: {'n': '?', 's': '?'}, 571: {'n': '?', 's': '?'}, 584: {'n': '?', 's': '?'}, 669: {'n': '?', 's': '?'}, 695: {'n': '?', 's': '?', 'e': '?'}, 757: {'n': '?', 's': '?'}, 814: {'n': '?', 's': '?'}, 849: {'n': '?', 'e': '?'}, 955: {'w': '?'}, 696: {'s': '?', 'w': '?'}, 753: {'n': '?', 's': '?', 'e': '?'}, 784: {'n': '?'}, 775: {'s': '?', 'e': '?', 'w': '?'}, 790: {'e': '?', 'w': '?'}, 835: {'e': '?', 'w': '?'}, 883: {'s': '?', 'e': '?', 'w': '?'}, 890: {'n': '?', 'w': '?'}, 926: {'e': '?'}, 891: {'s': '?', 'w': '?'}, 969: {'n': '?', 'e': '?'}, 984: {'w': '?'}, 823: {'n': '?', 'e': '?'}, 824: {'s': '?', 'w': '?'}, 827: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 832: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 888: {'e': '?', 'w': '?'}, 936: {'s': '?', 'e': '?'}, 988: {'n': '?'}, 932: {'n': '?', 'e': '?'}, 950: {'w': '?'}, 844: {'w': '?'}, 985: {'e': '?'}, 904: {'e': '?', 'w': '?'}, 976: {'w': '?'}, 505: {'e': '?', 'w': '?'}, 525: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 542: {'n': '?', 's': '?', 'w': '?'}, 554: {'s': '?', 'e': '?'}, 567: {'n': '?', 's': '?'}, 574: {'n': '?', 's': '?'}, 588: {'n': '?'}, 549: {'n': '?', 's': '?'}, 556: {'n': '?', 's': '?', 'e': '?'}, 600: {'n': '?', 's': '?', 'e': '?'}, 648: {'n': '?', 's': '?', 'w': '?'}, 673: {'e': '?'}, 735: {'n': '?'}, 610: {'s': '?', 'w': '?'}, 732: {'n': '?', 's': '?'}, 779: {'n': '?'}, 598: {'e': '?', 'w': '?'}, 659: {'s': '?', 'e': '?', 'w': '?'}, 754: {'w': '?'}, 665: {'n': '?', 's': '?', 'e': '?'}, 700: {'s': '?', 'w': '?'}, 813: {'n': '?', 's': '?', 'e': '?'}, 831: {'n': '?'}, 858: {'s': '?', 'e': '?', 'w': '?'}, 907: {'n': '?', 'e': '?'}, 925: {'s': '?', 'w': '?'}, 965: {'n': '?', 'e': '?'}, 980: {'s': '?', 'w': '?'}, 999: {'n': '?'}, 879: {'w': '?'}, 723: {'n': '?', 's': '?'}, 816: {'n': '?'}, 533: {'s': '?', 'w': '?'}, 539: {'n': '?', 's': '?'}, 540: {'n': '?', 'e': '?'}, 585: {'e': '?', 'w': '?'}, 682: {'w': '?'}, 560: {'s': '?', 'e': '?'}, 602: {'e': '?', 'w': '?'}, 612: {'s': '?', 'e': '?', 'w': '?'}, 635: {'e': '?', 'w': '?'}, 720: {'w': '?'}, 637: {'n': '?', 's': '?', 'e': '?'}, 650: {'e': '?', 'w': '?'}, 758: {'w': '?'}, 651: {'n': '?', 'e': '?'}, 674: {'e': '?', 'w': '?'}, 778: {'s': '?', 'w': '?'}, 815: {'n': '?', 's': '?'}, 825: {'n': '?', 's': '?'}, 854: {'n': '?'}, 509: {'s': '?', 'e': '?', 'w': '?'}, 510: {'n': '?', 'e': '?', 'w': '?'}, 517: {'s': '?'}, 513: {'n': '?', 'e': '?', 'w': '?'}, 532: {'n': '?', 'e': '?', 'w': '?'}, 553: {'n': '?', 's': '?'}, 593: {'s': '?'}, 568: {'n': '?', 'e': '?', 'w': '?'}, 580: {'e': '?', 'w': '?'}, 606: {'s': '?', 'e': '?', 'w': '?'}, 722: {'e': '?', 'w': '?'}, 763: {'s': '?', 'e': '?', 'w': '?'}, 846: {'e': '?'}, 826: {'n': '?'}, 608: {'n': '?', 'w': '?'}, 752: {'e': '?'}, 573: {'s': '?'}, 550: {'n': '?', 's': '?'}, 570: {'s': '?'}, 524: {'n': '?', 's': '?', 'w': '?'}, 545: {'n': '?', 's': '?'}, 565: {'n': '?', 's': '?'}, 590: {'n': '?', 's': '?'}, 625: {'n': '?', 's': '?'}, 699: {'n': '?', 's': '?'}, 809: {'n': '?'}, 526: {'s': '?', 'e': '?', 'w': '?'}, 530: {'s': '?', 'e': '?', 'w': '?'}, 577: {'n': '?', 's': '?'}, 589: {'n': '?'}, 559: {'s': '?', 'e': '?', 'w': '?'}, 569: {'e': '?', 'w': '?'}, 615: {'e': '?'}, 572: {'n': '?', 's': '?', 'w': '?'}, 621: {'n': '?', 's': '?'}, 634: {'n': '?', 's': '?', 'w': '?'}, 639: {'n': '?', 's': '?', 'w': '?'}, 653: {'n': '?', 's': '?', 'w': '?'}, 661: {'n': '?', 'w': '?'}, 788: {'e': '?', 'w': '?'}, 867: {'e': '?', 'w': '?'}, 881: {'s': '?', 'e': '?', 'w': '?'}, 898: {'n': '?'}, 884: {'e': '?'}, 690: {'e': '?', 'w': '?'}, 817: {'e': '?'}, 702: {'e': '?', 'w': '?'}, 715: {'e': '?', 'w': '?'}, 791: {'s': '?', 'e': '?', 'w': '?'}, 855: {'n': '?'}, 852: {'s': '?', 'e': '?', 'w': '?'}, 978: {'e': '?'}, 903: {'n': '?', 'w': '?'}, 951: {'e': '?'}, 636: {'e': '?'}, 607: {'s': '?', 'e': '?', 'w': '?'}, 640: {'n': '?', 'w': '?'}, 693: {'s': '?', 'e': '?', 'w': '?'}, 765: {'s': '?', 'e': '?'}, 870: {'n': '?', 'w': '?'}, 882: {'e': '?'}, 694: {'n': '?'}, 630: {'e': '?', 'w': '?'}, 755: {'e': '?', 'w': '?'}, 766: {'s': '?', 'e': '?', 'w': '?'}, 857: {'s': '?', 'e': '?', 'w': '?'}, 875: {'n': '?', 's': '?'}, 989: {'n': '?'}, 918: {'n': '?', 'e': '?', 'w': '?'}, 994: {'e': '?'}, 933: {'s': '?'}, 931: {'n': '?'}, 538: {'n': '?', 's': '?'}, 564: {'n': '?', 's': '?'}, 586: {'n': '?', 's': '?', 'w': '?'}, 619: {'n': '?', 's': '?'}, 670: {'n': '?', 's': '?'}, 707: {'n': '?', 's': '?'}, 719: {'n': '?', 's': '?', 'e': '?'}, 749: {'n': '?', 's': '?', 'e': '?'}, 822: {'s': '?', 'w': '?'}, 872: {'n': '?', 's': '?', 'e': '?'}, 968: {'w': '?'}, 906: {'n': '?'}, 859: {'n': '?', 's': '?'}, 938: {'n': '?', 's': '?'}, 975: {'n': '?', 's': '?'}, 983: {'n': '?'}, 800: {'w': '?'}, 599: {'s': '?', 'e': '?'}, 632: {'n': '?', 's': '?'}, 654: {'n': '?', 's': '?'}, 677: {'n': '?', 's': '?'}, 691: {'n': '?', 's': '?', 'w': '?'}, 704: {'e': '?', 'w': '?'}, 774: {'e': '?', 'w': '?'}, 842: {'e': '?'}, 716: {'n': '?', 's': '?', 'w': '?'}, 761: {'s': '?', 'e': '?', 'w': '?'}, 837: {'e': '?', 'w': '?'}, 948: {'e': '?', 'w': '?'}, 998: {'e': '?'}, 863: {'n': '?', 's': '?', 'w': '?'}, 873: {'s': '?', 'e': '?', 'w': '?'}, 914: {'n': '?'}, 899: {'e': '?'}, 913: {'n': '?', 's': '?'}, 922: {'n': '?', 's': '?', 'w': '?'}, 959: {'e': '?'}, 964: {'n': '?'}, 836: {'n': '?', 's': '?'}, 860: {'n': '?', 's': '?'}, 941: {'n': '?', 's': '?'}, 947: {'n': '?'}, 501: {'e': '?'}, 523: {'e': '?'}, 544: {'e': '?', 'w': '?'}, 552: {'e': '?', 'w': '?'}, 604: {'w': '?'}, 529: {'e': '?'}, 512: {'n': '?', 's': '?', 'w': '?'}, 541: {'n': '?', 'e': '?', 'w': '?'}, 546: {'n': '?', 'e': '?', 'w': '?'}, 557: {'s': '?'}, 548: {'n': '?', 'e': '?', 'w': '?'}, 605: {'n': '?', 'e': '?', 'w': '?'}, 679: {'s': '?'}, 611: {'n': '?', 'e': '?', 'w': '?'}, 624: {'n': '?', 'e': '?'}, 689: {'s': '?'}, 656: {'n': '?', 's': '?'}, 727: {'n': '?', 's': '?'}, 759: {'n': '?', 's': '?'}, 880: {'s': '?', 'w': '?'}, 886: {'e': '?'}, 655: {'s': '?'}, 543: {'s': '?'}, 534: {'n': '?', 's': '?'}, 551: {'n': '?', 's': '?', 'w': '?'}, 558: {'e': '?', 'w': '?'}, 587: {'n': '?', 'e': '?', 'w': '?'}, 594: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 622: {'w': '?'}, 649: {'s': '?'}, 641: {'n': '?', 'e': '?', 'w': '?'}, 663: {'s': '?'}, 683: {'n': '?', 'e': '?'}, 713: {'n': '?', 's': '?'}, 747: {'n': '?', 's': '?', 'w': '?'}, 839: {'s': '?', 'w': '?'}, 911: {'e': '?', 'w': '?'}, 921: {'e': '?', 'w': '?'}, 990: {'e': '?', 'w': '?'}, 991: {'e': '?'}, 828: {'e': '?'}, 592: {'e': '?', 'w': '?'}, 697: {'e': '?'}, 591: {'n': '?', 's': '?'}, 627: {'n': '?', 's': '?'}, 643: {'n': '?', 's': '?', 'w': '?'}, 668: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 706: {'n': '?', 's': '?'}, 743: {'n': '?', 's': '?', 'w': '?'}, 750: {'n': '?', 'e': '?', 'w': '?'}, 840: {'e': '?', 'w': '?'}, 887: {'e': '?', 'w': '?'}, 949: {'e': '?'}, 776: {'n': '?', 's': '?', 'w': '?'}, 805: {'e': '?', 'w': '?'}, 838: {'n': '?', 'e': '?', 'w': '?'}, 845: {'n': '?', 'e': '?'}, 895: {'s': '?', 'w': '?'}, 916: {'s': '?', 'e': '?', 'w': '?'}, 987: {'e': '?'}, 993: {'n': '?'}, 851: {'n': '?', 's': '?'}, 940: {'s': '?'}, 777: {'s': '?', 'e': '?', 'w': '?'}, 894: {'n': '?', 'e': '?'}, 935: {'n': '?', 's': '?'}, 957: {'s': '?'}, 785: {'w': '?'}, 760: {'s': '?'}, 738: {'n': '?'}, 688: {'n': '?', 'e': '?', 'w': '?'}, 745: {'s': '?', 'w': '?'}, 792: {'e': '?'}, 730: {'e': '?'}, 676: {'n': '?', 's': '?', 'e': '?'}, 686: {'w': '?'}, 726: {'n': '?', 's': '?', 'e': '?'}, 746: {'n': '?', 'w': '?'}, 771: {'s': '?', 'e': '?'}, 801: {'w': '?'}, 773: {'n': '?', 's': '?'}, 789: {'s': '?', 'e': '?'}, 795: {'n': '?', 'w': '?'}, 804: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 811: {'e': '?', 'w': '?'}, 934: {'n': '?', 'e': '?'}, 945: {'n': '?', 's': '?'}, 967: {'s': '?'}, 971: {'s': '?'}, 970: {'w': '?'}, 620: {'n': '?', 's': '?', 'w': '?'}, 692: {'s': '?', 'e': '?', 'w': '?'}, 698: {'n': '?', 's': '?', 'w': '?'}, 742: {'e': '?', 'w': '?'}, 843: {'e': '?'}, 714: {'n': '?', 'w': '?'}, 783: {'e': '?', 'w': '?'}, 871: {'s': '?', 'e': '?'}, 942: {'n': '?'}, 710: {'e': '?'}, 660: {'n': '?'}} \ No newline at end of file diff --git a/move_sell_pray/visited2.txt b/move_sell_pray/visited2.txt new file mode 100644 index 00000000..1c85924e --- /dev/null +++ b/move_sell_pray/visited2.txt @@ -0,0 +1 @@ +{509: {'s': '?', 'e': 502, 'w': '?'}, 143: {'e': '?', 'w': '?'}, 121: {'n': '?', 'e': '?', 'w': '?'}, 107: {'s': '?', 'e': '?', 'w': '?'}, 120: {'n': '?', 'e': '?'}, 127: {'e': '?', 'w': '?'}, 184: {'e': '?', 'w': '?'}, 221: {'s': '?', 'e': '?', 'w': '?'}, 253: {'n': '?', 'e': '?'}, 258: {'e': '?', 'w': '?'}, 306: {'e': '?', 'w': '?'}, 397: {'w': '?'}, 240: {'n': '?', 'e': '?', 'w': '?'}, 249: {'n': '?', 's': '?', 'e': '?'}, 282: {'w': '?'}, 265: {'n': '?', 's': '?', 'e': '?'}, 279: {'s': '?'}, 270: {'n': '?', 'e': '?', 'w': '?'}, 338: {'s': '?', 'w': '?'}, 379: {'n': '?', 'e': '?'}, 395: {'s': '?', 'e': '?', 'w': '?'}, 403: {'n': '?'}, 421: {'n': '?', 'w': '?'}, 440: {'s': '?', 'w': '?'}, 476: {'e': '?'}, 416: {'s': '?'}, 386: {'e': '?', 'w': '?'}, 414: {'w': '?'}, 104: {'n': '?', 'e': '?'}, 59: {'n': '?', 's': '?', 'e': '?'}, 38: {'s': '?', 'e': '?', 'w': '?'}, 66: {'n': '?', 'e': '?', 'w': '?'}, 123: {'w': '?'}, 169: {'s': '?', 'e': '?'}, 186: {'e': '?', 'w': '?'}, 205: {'s': '?', 'e': '?', 'w': '?'}, 479: {'w': '?'}, 241: {'n': '?', 'e': '?'}, 266: {'w': '?'}, 33: {'e': '?', 'w': '?'}, 31: {'n': '?', 'e': '?'}, 30: {'s': '?', 'e': '?', 'w': '?'}, 32: {'n': '?', 'e': '?', 'w': '?'}, 39: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 41: {'e': '?'}, 51: {'n': '?', 'e': '?', 'w': '?'}, 57: {'e': '?', 'w': '?'}, 145: {'n': '?', 'e': '?', 'w': '?'}, 220: {'w': '?'}, 174: {'n': '?', 's': '?', 'e': '?'}, 224: {'w': '?'}, 192: {'n': '?', 's': '?', 'e': '?'}, 223: {'n': '?', 'w': '?'}, 283: {'n': '?', 's': '?', 'e': '?'}, 313: {'w': '?'}, 331: {'s': '?', 'e': '?'}, 446: {'e': '?', 'w': '?'}, 466: {'s': '?', 'e': '?', 'w': '?'}, 486: {'n': '?'}, 472: {'w': '?'}, 201: {'s': '?'}, 69: {'n': '?', 's': '?', 'e': '?'}, 94: {'n': '?', 's': '?'}, 152: {'s': '?'}, 103: {'n': '?', 'w': '?'}, 160: {'s': '?'}, 53: {'n': '?', 's': '?', 'w': '?'}, 88: {'e': '?', 'w': '?'}, 122: {'n': '?', 'e': '?'}, 124: {'n': '?', 's': '?'}, 157: {'n': '?', 's': '?', 'w': '?'}, 182: {'e': '?', 'w': '?'}, 208: {'e': '?'}, 210: {'s': '?'}, 95: {'n': '?', 's': '?', 'w': '?'}, 119: {'n': '?', 's': '?'}, 134: {'n': '?', 's': '?', 'e': '?'}, 144: {'e': '?', 'w': '?'}, 155: {'s': '?', 'e': '?', 'w': '?'}, 187: {'n': '?'}, 316: {'n': '?', 'w': '?'}, 344: {'n': '?', 's': '?', 'e': '?'}, 392: {'s': '?', 'e': '?'}, 462: {'w': '?'}, 390: {'w': '?'}, 147: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 200: {'n': '?', 's': '?', 'e': '?'}, 227: {'n': '?', 's': '?'}, 269: {'n': '?', 's': '?'}, 319: {'n': '?', 's': '?', 'e': '?'}, 359: {'s': '?'}, 345: {'s': '?', 'w': '?'}, 375: {'n': '?', 'e': '?'}, 385: {'w': '?'}, 206: {'n': '?', 'e': '?', 'w': '?'}, 380: {'n': '?', 'w': '?'}, 424: {'s': '?', 'e': '?'}, 473: {'e': '?', 'w': '?'}, 494: {'w': '?'}, 288: {'s': '?'}, 151: {'n': '?', 'e': '?', 'w': '?'}, 207: {'n': '?', 'e': '?', 'w': '?'}, 231: {'s': '?', 'w': '?'}, 248: {'n': '?', 'e': '?', 'w': '?'}, 280: {'n': '?', 'e': '?'}, 325: {'n': '?', 's': '?', 'w': '?'}, 374: {'e': '?'}, 353: {'s': '?'}, 296: {'s': '?'}, 290: {'e': '?'}, 172: {'n': '?', 's': '?'}, 267: {'n': '?', 's': '?', 'w': '?'}, 271: {'n': '?', 'e': '?'}, 337: {'s': '?'}, 285: {'n': '?', 's': '?'}, 286: {'n': '?', 's': '?', 'w': '?'}, 291: {'n': '?', 'e': '?', 'w': '?'}, 347: {'n': '?', 's': '?', 'e': '?'}, 452: {'s': '?'}, 442: {'n': '?'}, 410: {'s': '?'}, 336: {'s': '?'}, 153: {'e': '?', 'w': '?'}, 329: {'w': '?'}, 115: {'n': '?', 'e': '?'}, 116: {'n': '?', 's': '?'}, 132: {'s': '?'}, 54: {'w': '?'}, 27: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 28: {'n': '?'}, 20: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 63: {'n': '?', 's': '?', 'w': '?'}, 73: {'e': '?'}, 72: {'s': '?', 'w': '?'}, 76: {'n': '?', 'e': '?', 'w': '?'}, 83: {'s': '?', 'e': '?', 'w': '?'}, 130: {'w': '?'}, 125: {'n': '?', 'e': '?', 'w': '?'}, 237: {'e': '?', 'w': '?'}, 245: {'s': '?', 'e': '?'}, 254: {'n': '?', 'w': '?'}, 314: {'e': '?'}, 165: {'n': '?', 's': '?', 'w': '?'}, 203: {'n': '?', 's': '?', 'e': '?'}, 299: {'e': '?', 'w': '?'}, 311: {'w': '?'}, 268: {'s': '?', 'e': '?', 'w': '?'}, 411: {'w': '?'}, 312: {'n': '?', 'e': '?'}, 328: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 332: {'n': '?', 's': '?'}, 350: {'n': '?', 's': '?', 'e': '?'}, 436: {'s': '?'}, 404: {'n': '?', 'w': '?'}, 481: {'s': '?'}, 363: {'n': '?', 'e': '?'}, 372: {'n': '?', 's': '?'}, 441: {'s': '?'}, 357: {'w': '?'}, 204: {'n': '?', 'e': '?', 'w': '?'}, 219: {'s': '?'}, 216: {'n': '?', 'e': '?', 'w': '?'}, 234: {'n': '?', 's': '?', 'w': '?'}, 252: {'n': '?', 'e': '?'}, 284: {'n': '?', 's': '?', 'w': '?'}, 303: {'n': '?', 'e': '?', 'w': '?'}, 405: {'n': '?', 'e': '?'}, 406: {'s': '?', 'w': '?'}, 415: {'e': '?', 'w': '?'}, 418: {'n': '?', 's': '?', 'e': '?'}, 474: {'n': '?'}, 425: {'s': '?', 'w': '?'}, 469: {'e': '?'}, 361: {'n': '?', 's': '?'}, 408: {'n': '?', 's': '?', 'w': '?'}, 423: {'e': '?', 'w': '?'}, 454: {'n': '?', 'e': '?'}, 470: {'s': '?'}, 458: {'s': '?', 'w': '?'}, 459: {'e': '?'}, 302: {'n': '?', 's': '?'}, 422: {'n': '?', 's': '?'}, 426: {'n': '?', 's': '?'}, 457: {'n': '?', 's': '?'}, 461: {'s': '?'}, 368: {'s': '?'}, 218: {'s': '?', 'e': '?', 'w': '?'}, 242: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 287: {'s': '?', 'w': '?'}, 339: {'e': '?', 'w': '?'}, 445: {'n': '?', 'e': '?', 'w': '?'}, 450: {'e': '?'}, 447: {'s': '?'}, 259: {'n': '?', 'w': '?'}, 310: {'e': '?', 'w': '?'}, 412: {'s': '?', 'e': '?'}, 488: {'n': '?'}, 275: {'e': '?', 'w': '?'}, 456: {'e': '?', 'w': '?'}, 499: {'e': '?'}, 263: {'n': '?'}, 110: {'e': '?'}, 19: {'n': '?', 's': '?', 'w': '?'}, 10: {'n': '?', 's': '?', 'w': '?'}, 43: {'e': '?', 'w': '?'}, 47: {'n': '?', 'e': '?'}, 71: {'s': '?'}, 0: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 1: {'e': '?'}, 4: {'n': '?', 'e': '?', 'w': '?'}, 13: {'e': '?', 'w': '?'}, 15: {'w': '?'}, 23: {'s': '?', 'e': '?'}, 26: {'e': '?', 'w': '?'}, 55: {'w': '?'}, 2: {'n': '?', 's': '?', 'e': '?'}, 3: {'s': '?', 'e': '?', 'w': '?'}, 5: {'w': '?'}, 9: {'n': '?', 's': '?', 'e': '?'}, 11: {'e': '?', 'w': '?'}, 17: {'n': '?', 'e': '?', 'w': '?'}, 24: {'s': '?'}, 42: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 44: {'s': '?'}, 80: {'n': '?', 's': '?', 'e': '?'}, 81: {'n': '?'}, 86: {'s': '?', 'e': '?', 'w': '?'}, 90: {'e': '?', 'w': '?'}, 178: {'n': '?', 'e': '?', 'w': '?'}, 209: {'s': '?'}, 243: {'s': '?', 'e': '?', 'w': '?'}, 256: {'s': '?', 'e': '?', 'w': '?'}, 327: {'e': '?', 'w': '?'}, 427: {'e': '?', 'w': '?'}, 430: {'n': '?', 'e': '?', 'w': '?'}, 439: {'w': '?'}, 443: {'s': '?', 'e': '?'}, 471: {'w': '?'}, 360: {'n': '?', 'e': '?'}, 398: {'e': '?', 'w': '?'}, 438: {'e': '?', 'w': '?'}, 465: {'e': '?', 'w': '?'}, 498: {'w': '?'}, 293: {'n': '?'}, 96: {'n': '?', 'e': '?'}, 97: {'e': '?', 'w': '?'}, 181: {'w': '?'}, 118: {'e': '?', 'w': '?'}, 137: {'w': '?'}, 12: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 14: {'s': '?', 'e': '?', 'w': '?'}, 37: {'w': '?'}, 34: {'n': '?', 's': '?', 'e': '?'}, 50: {'n': '?', 's': '?'}, 89: {'n': '?', 's': '?'}, 93: {'n': '?', 'w': '?'}, 108: {'n': '?', 's': '?', 'e': '?'}, 78: {'n': '?', 's': '?'}, 22: {'n': '?', 's': '?', 'w': '?'}, 18: {'n': '?', 's': '?', 'w': '?'}, 25: {'e': '?'}, 21: {'e': '?', 'w': '?'}, 29: {'s': '?', 'e': '?', 'w': '?'}, 49: {'s': '?', 'e': '?', 'w': '?'}, 136: {'e': '?', 'w': '?'}, 148: {'e': '?', 'w': '?'}, 292: {'n': '?', 'e': '?'}, 301: {'n': '?', 's': '?'}, 304: {'s': '?'}, 79: {'n': '?'}, 45: {'n': '?', 's': '?'}, 60: {'n': '?', 'e': '?', 'w': '?'}, 36: {'s': '?', 'e': '?', 'w': '?'}, 48: {'n': '?', 's': '?', 'w': '?'}, 105: {'n': '?', 'w': '?'}, 202: {'e': '?'}, 149: {'e': '?'}, 117: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 166: {'s': '?', 'e': '?', 'w': '?'}, 150: {'n': '?', 'w': '?'}, 135: {'s': '?', 'e': '?'}, 106: {'n': '?', 's': '?', 'w': '?'}, 111: {'n': '?', 's': '?', 'e': '?'}, 158: {'s': '?', 'w': '?'}, 167: {'n': '?', 's': '?', 'e': '?'}, 260: {'w': '?'}, 262: {'n': '?', 's': '?', 'e': '?'}, 358: {'e': '?', 'w': '?'}, 401: {'w': '?'}, 370: {'n': '?', 's': '?', 'e': '?'}, 434: {'n': '?'}, 407: {'s': '?', 'w': '?'}, 496: {'n': '?'}, 367: {'n': '?'}, 100: {'s': '?', 'e': '?', 'w': '?'}, 112: {'s': '?', 'e': '?', 'w': '?'}, 140: {'w': '?'}, 141: {'n': '?', 'e': '?'}, 156: {'s': '?', 'e': '?', 'w': '?'}, 168: {'n': '?', 'e': '?'}, 340: {'w': '?'}, 164: {'n': '?', 'e': '?', 'w': '?'}, 217: {'s': '?', 'e': '?'}, 247: {'e': '?', 'w': '?'}, 261: {'s': '?', 'e': '?', 'w': '?'}, 277: {'n': '?', 'e': '?'}, 323: {'e': '?', 'w': '?'}, 433: {'s': '?', 'e': '?', 'w': '?'}, 460: {'w': '?'}, 455: {'n': '?'}, 322: {'n': '?', 'e': '?', 'w': '?'}, 435: {'w': '?'}, 382: {'s': '?', 'e': '?'}, 388: {'e': '?', 'w': '?'}, 477: {'e': '?', 'w': '?'}, 483: {'w': '?'}, 298: {'s': '?', 'w': '?'}, 324: {'n': '?', 's': '?', 'e': '?'}, 349: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 384: {'w': '?'}, 352: {'n': '?', 's': '?', 'e': '?'}, 485: {'w': '?'}, 362: {'n': '?', 's': '?', 'w': '?'}, 399: {'n': '?', 's': '?'}, 467: {'n': '?'}, 463: {'s': '?', 'e': '?'}, 468: {'n': '?'}, 356: {'e': '?'}, 354: {'w': '?'}, 68: {'n': '?', 'e': '?'}, 52: {'n': '?', 's': '?', 'e': '?'}, 75: {'e': '?', 'w': '?'}, 85: {'e': '?', 'w': '?'}, 154: {'e': '?', 'w': '?'}, 193: {'e': '?', 'w': '?'}, 251: {'e': '?', 'w': '?'}, 315: {'w': '?'}, 35: {'s': '?', 'w': '?'}, 6: {'n': '?', 'w': '?'}, 7: {'n': '?', 'e': '?', 'w': '?'}, 56: {'e': '?', 'w': '?'}, 61: {'e': '?', 'w': '?'}, 171: {'e': '?'}, 8: {'s': '?', 'w': '?'}, 16: {'n': '?', 'e': '?', 'w': '?'}, 58: {'s': '?', 'w': '?'}, 65: {'n': '?', 'e': '?', 'w': '?'}, 74: {'n': '?', 's': '?', 'w': '?'}, 161: {'e': '?'}, 87: {'s': '?'}, 139: {'e': '?', 'w': '?'}, 188: {'e': '?', 'w': '?'}, 335: {'e': '?', 'w': '?'}, 366: {'e': '?'}, 67: {'e': '?', 'w': '?'}, 162: {'e': '?'}, 77: {'e': '?'}, 46: {'e': '?', 'w': '?'}, 62: {'n': '?', 'e': '?', 'w': '?'}, 84: {'e': '?', 'w': '?'}, 91: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 101: {'n': '?', 'w': '?'}, 113: {'s': '?', 'e': '?'}, 114: {'n': '?', 'w': '?'}, 176: {'e': '?', 'w': '?'}, 402: {'e': '?', 'w': '?'}, 451: {'e': '?', 'w': '?'}, 453: {'s': '?', 'e': '?'}, 464: {'n': '?'}, 99: {'n': '?', 'e': '?', 'w': '?'}, 190: {'s': '?'}, 146: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 215: {'n': '?', 's': '?'}, 246: {'s': '?'}, 257: {'n': '?', 'e': '?', 'w': '?'}, 364: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 429: {'s': '?'}, 381: {'n': '?', 'w': '?'}, 394: {'e': '?'}, 448: {'e': '?'}, 320: {'n': '?', 's': '?'}, 348: {'s': '?'}, 177: {'n': '?', 'w': '?'}, 346: {'e': '?'}, 180: {'s': '?'}, 64: {'s': '?', 'w': '?'}, 82: {'n': '?', 'e': '?'}, 191: {'s': '?'}, 40: {'s': '?'}, 92: {'w': '?'}, 128: {'s': '?', 'e': '?'}, 189: {'e': '?', 'w': '?'}, 255: {'w': '?'}, 212: {'w': '?'}, 70: {'s': '?', 'e': '?', 'w': '?'}, 163: {'n': '?'}, 98: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 126: {'n': '?', 's': '?'}, 129: {'n': '?', 'e': '?', 'w': '?'}, 170: {'e': '?'}, 194: {'s': '?', 'w': '?'}, 214: {'n': '?', 'e': '?', 'w': '?'}, 173: {'e': '?', 'w': '?'}, 133: {'e': '?', 'w': '?'}, 131: {'n': '?', 's': '?', 'w': '?'}, 244: {'n': '?', 'e': '?'}, 239: {'n': '?', 'w': '?'}, 198: {'n': '?', 's': '?', 'e': '?'}, 199: {'s': '?', 'w': '?'}, 230: {'n': '?', 's': '?', 'e': '?'}, 297: {'w': '?'}, 307: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 371: {'s': '?', 'w': '?'}, 475: {'n': '?', 's': '?'}, 484: {'n': '?'}, 373: {'n': '?', 's': '?'}, 480: {'n': '?'}, 321: {'s': '?', 'e': '?'}, 413: {'n': '?'}, 138: {'s': '?', 'e': '?', 'w': '?'}, 195: {'s': '?', 'e': '?', 'w': '?'}, 228: {'n': '?', 's': '?'}, 281: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 309: {'s': '?', 'e': '?', 'w': '?'}, 333: {'n': '?', 's': '?'}, 378: {'n': '?'}, 326: {'s': '?', 'w': '?'}, 492: {'e': '?'}, 431: {'e': '?', 'w': '?'}, 387: {'n': '?', 's': '?', 'w': '?'}, 417: {'n': '?'}, 317: {'s': '?', 'e': '?', 'w': '?'}, 318: {'n': '?', 's': '?'}, 487: {'n': '?', 's': '?'}, 489: {'n': '?'}, 409: {'e': '?'}, 225: {'s': '?', 'e': '?'}, 278: {'n': '?'}, 211: {'n': '?'}, 226: {'s': '?', 'e': '?'}, 300: {'n': '?', 's': '?', 'w': '?'}, 389: {'e': '?'}, 377: {'n': '?'}, 102: {'s': '?', 'w': '?'}, 142: {'e': '?', 'w': '?'}, 159: {'e': '?', 'w': '?'}, 196: {'n': '?', 'e': '?', 'w': '?'}, 197: {'n': '?', 'e': '?', 'w': '?'}, 232: {'n': '?', 's': '?', 'w': '?'}, 272: {'n': '?', 's': '?'}, 295: {'s': '?'}, 235: {'n': '?', 'e': '?', 'w': '?'}, 330: {'n': '?', 's': '?', 'w': '?'}, 369: {'n': '?', 's': '?', 'w': '?'}, 400: {'s': '?'}, 376: {'e': '?'}, 383: {'e': '?', 'w': '?'}, 495: {'e': '?'}, 355: {'e': '?'}, 276: {'e': '?', 'w': '?'}, 419: {'e': '?'}, 222: {'n': '?', 's': '?'}, 305: {'n': '?', 's': '?'}, 365: {'s': '?'}, 109: {'s': '?', 'e': '?', 'w': '?'}, 175: {'s': '?', 'e': '?', 'w': '?'}, 183: {'n': '?', 's': '?'}, 229: {'n': '?', 's': '?', 'w': '?'}, 250: {'n': '?', 's': '?', 'e': '?'}, 289: {'w': '?'}, 294: {'n': '?', 's': '?'}, 334: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 341: {'s': '?', 'w': '?'}, 449: {'n': '?'}, 391: {'s': '?', 'e': '?', 'w': '?'}, 428: {'e': '?'}, 396: {'n': '?'}, 393: {'n': '?', 's': '?'}, 482: {'n': '?'}, 236: {'s': '?', 'e': '?'}, 264: {'n': '?', 's': '?', 'w': '?'}, 274: {'n': '?', 'w': '?'}, 308: {'e': '?'}, 273: {'n': '?', 'e': '?'}, 343: {'s': '?', 'w': '?'}, 351: {'s': '?', 'e': '?', 'w': '?'}, 478: {'e': '?'}, 491: {'n': '?'}, 179: {'s': '?', 'e': '?', 'w': '?'}, 213: {'e': '?', 'w': '?'}, 420: {'s': '?', 'e': '?', 'w': '?'}, 437: {'e': '?', 'w': '?'}, 497: {'e': '?'}, 444: {'n': '?', 'w': '?'}, 490: {'e': '?', 'w': '?'}, 493: {'e': '?'}, 233: {'n': '?', 'w': '?'}, 238: {'e': '?'}, 185: {'n': '?'}, 342: {'n': '?', 's': '?'}, 432: {'n': '?'}, 657: {'e': '?'}, 616: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 638: {'n': '?', 's': '?'}, 647: {'n': '?', 's': '?', 'w': '?'}, 666: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 803: {'n': '?', 'e': '?'}, 834: {'n': '?', 's': '?'}, 905: {'n': '?', 's': '?'}, 977: {'s': '?'}, 729: {'n': '?', 'w': '?'}, 731: {'s': '?'}, 833: {'n': '?', 's': '?'}, 900: {'n': '?', 's': '?'}, 928: {'s': '?'}, 701: {'e': '?'}, 628: {'n': '?', 'e': '?', 'w': '?'}, 671: {'s': '?', 'w': '?'}, 781: {'n': '?', 'e': '?'}, 787: {'n': '?', 's': '?'}, 861: {'n': '?', 's': '?', 'w': '?'}, 862: {'n': '?', 'e': '?'}, 878: {'s': '?'}, 930: {'s': '?'}, 681: {'e': '?', 'w': '?'}, 685: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 744: {'n': '?', 'w': '?'}, 797: {'s': '?', 'e': '?', 'w': '?'}, 812: {'n': '?', 's': '?'}, 892: {'n': '?', 's': '?'}, 943: {'n': '?', 'w': '?'}, 952: {'e': '?'}, 807: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 856: {'s': '?'}, 864: {'n': '?', 's': '?'}, 927: {'n': '?'}, 869: {'e': '?'}, 725: {'e': '?'}, 767: {'n': '?', 's': '?', 'w': '?'}, 796: {'s': '?', 'w': '?'}, 850: {'n': '?', 'e': '?', 'w': '?'}, 973: {'n': '?', 'e': '?'}, 981: {'s': '?'}, 954: {'s': '?'}, 819: {'e': '?', 'w': '?'}, 893: {'e': '?', 'w': '?'}, 944: {'e': '?'}, 613: {'e': '?', 'w': '?'}, 575: {'e': '?', 'w': '?'}, 547: {'e': '?', 'w': '?'}, 537: {'e': '?', 'w': '?'}, 527: {'e': '?', 'w': '?'}, 516: {'s': '?', 'e': '?', 'w': '?'}, 597: {'s': '?', 'e': '?', 'w': '?'}, 626: {'n': '?'}, 596: {'n': '?', 'w': '?'}, 566: {'s': '?', 'e': '?', 'w': '?'}, 581: {'e': '?', 'w': '?'}, 614: {'e': '?'}, 562: {'e': '?', 'w': '?'}, 535: {'e': '?', 'w': '?'}, 528: {'n': '?', 's': '?', 'w': '?'}, 555: {'n': '?'}, 511: {'n': '?', 'e': '?', 'w': '?'}, 507: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 518: {'e': '?', 'w': '?'}, 519: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 563: {'s': '?'}, 583: {'n': '?', 'e': '?'}, 595: {'w': '?'}, 520: {'n': '?', 'e': '?', 'w': '?'}, 579: {'n': '?', 's': '?'}, 601: {'n': '?', 's': '?', 'e': '?'}, 629: {'n': '?', 'e': '?', 'w': '?'}, 667: {'e': '?', 'w': '?'}, 717: {'e': '?', 'w': '?'}, 820: {'n': '?', 'e': '?', 'w': '?'}, 866: {'s': '?'}, 876: {'w': '?'}, 684: {'n': '?', 's': '?', 'e': '?'}, 687: {'e': '?', 'w': '?'}, 806: {'n': '?', 'w': '?'}, 909: {'n': '?', 's': '?', 'e': '?'}, 917: {'e': '?', 'w': '?'}, 929: {'w': '?'}, 910: {'s': '?'}, 718: {'n': '?', 's': '?', 'e': '?'}, 782: {'w': '?'}, 734: {'s': '?'}, 617: {'n': '?', 's': '?'}, 645: {'s': '?'}, 603: {'n': '?', 's': '?', 'w': '?'}, 609: {'n': '?', 's': '?', 'e': '?'}, 623: {'n': '?', 'e': '?'}, 633: {'e': '?', 'w': '?'}, 711: {'n': '?', 'e': '?', 'w': '?'}, 721: {'s': '?'}, 724: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 737: {'n': '?', 's': '?'}, 756: {'s': '?', 'e': '?'}, 868: {'n': '?', 'w': '?'}, 885: {'s': '?'}, 728: {'n': '?', 'e': '?', 'w': '?'}, 741: {'s': '?', 'e': '?'}, 793: {'n': '?', 'e': '?', 'w': '?'}, 808: {'n': '?', 's': '?', 'e': '?'}, 920: {'e': '?', 'w': '?'}, 946: {'w': '?'}, 821: {'n': '?', 's': '?', 'e': '?'}, 974: {'s': '?'}, 953: {'w': '?'}, 901: {'w': '?'}, 762: {'e': '?', 'w': '?'}, 874: {'e': '?', 'w': '?'}, 902: {'e': '?', 'w': '?'}, 956: {'e': '?', 'w': '?'}, 960: {'e': '?', 'w': '?'}, 966: {'e': '?', 'w': '?'}, 992: {'w': '?'}, 748: {'n': '?', 's': '?', 'e': '?'}, 764: {'s': '?', 'e': '?', 'w': '?'}, 848: {'e': '?', 'w': '?'}, 853: {'s': '?', 'e': '?', 'w': '?'}, 939: {'w': '?'}, 958: {'n': '?', 's': '?'}, 972: {'n': '?'}, 769: {'n': '?', 's': '?', 'e': '?'}, 847: {'w': '?'}, 799: {'n': '?', 'e': '?'}, 908: {'w': '?'}, 772: {'n': '?', 's': '?'}, 780: {'n': '?', 's': '?'}, 818: {'n': '?', 's': '?', 'e': '?'}, 829: {'e': '?', 'w': '?'}, 912: {'w': '?'}, 877: {'n': '?', 's': '?', 'e': '?'}, 937: {'w': '?'}, 997: {'n': '?'}, 652: {'w': '?'}, 618: {'s': '?', 'e': '?'}, 631: {'s': '?', 'w': '?'}, 646: {'n': '?', 'e': '?'}, 662: {'n': '?', 'w': '?'}, 675: {'s': '?', 'e': '?'}, 768: {'w': '?'}, 514: {'n': '?', 's': '?', 'e': '?'}, 515: {'n': '?', 'w': '?'}, 576: {'n': '?', 's': '?', 'e': '?'}, 582: {'n': '?', 's': '?', 'e': '?'}, 642: {'s': '?'}, 644: {'n': '?', 'w': '?'}, 664: {'n': '?', 's': '?'}, 680: {'s': '?'}, 578: {'w': '?'}, 521: {'n': '?', 's': '?'}, 522: {'n': '?', 's': '?'}, 536: {'n': '?', 's': '?'}, 658: {'n': '?', 's': '?', 'e': '?'}, 672: {'w': '?'}, 678: {'s': '?', 'e': '?'}, 703: {'n': '?', 'e': '?', 'w': '?'}, 709: {'n': '?', 's': '?', 'e': '?'}, 736: {'s': '?', 'e': '?'}, 786: {'n': '?', 'e': '?', 'w': '?'}, 798: {'n': '?', 's': '?'}, 889: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 923: {'w': '?'}, 919: {'s': '?'}, 915: {'e': '?'}, 961: {'w': '?'}, 712: {'e': '?', 'w': '?'}, 739: {'w': '?'}, 733: {'e': '?', 'w': '?'}, 740: {'s': '?', 'e': '?', 'w': '?'}, 770: {'n': '?'}, 751: {'n': '?', 'e': '?', 'w': '?'}, 810: {'s': '?'}, 794: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 841: {'e': '?', 'w': '?'}, 962: {'s': '?', 'w': '?'}, 963: {'n': '?', 'e': '?'}, 982: {'n': '?', 'w': '?'}, 995: {'s': '?', 'e': '?'}, 996: {'w': '?'}, 896: {'n': '?'}, 802: {'n': '?', 's': '?', 'e': '?'}, 830: {'s': '?'}, 865: {'n': '?', 'e': '?', 'w': '?'}, 924: {'s': '?', 'e': '?'}, 979: {'w': '?'}, 897: {'e': '?', 'w': '?'}, 986: {'w': '?'}, 506: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 531: {'w': '?'}, 504: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 500: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 503: {'w': '?'}, 502: {'n': '?', 's': '?', 'e': '?', 'w': 509}, 508: {'n': '?', 's': '?'}, 561: {'n': '?', 's': '?'}, 571: {'n': '?', 's': '?'}, 584: {'n': '?', 's': '?'}, 669: {'n': '?', 's': '?'}, 695: {'n': '?', 's': '?', 'e': '?'}, 757: {'n': '?', 's': '?'}, 814: {'n': '?', 's': '?'}, 849: {'n': '?', 'e': '?'}, 955: {'w': '?'}, 696: {'s': '?', 'w': '?'}, 753: {'n': '?', 's': '?', 'e': '?'}, 784: {'n': '?'}, 775: {'s': '?', 'e': '?', 'w': '?'}, 790: {'e': '?', 'w': '?'}, 835: {'e': '?', 'w': '?'}, 883: {'s': '?', 'e': '?', 'w': '?'}, 890: {'n': '?', 'w': '?'}, 926: {'e': '?'}, 891: {'s': '?', 'w': '?'}, 969: {'n': '?', 'e': '?'}, 984: {'w': '?'}, 823: {'n': '?', 'e': '?'}, 824: {'s': '?', 'w': '?'}, 827: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 832: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 888: {'e': '?', 'w': '?'}, 936: {'s': '?', 'e': '?'}, 988: {'n': '?'}, 932: {'n': '?', 'e': '?'}, 950: {'w': '?'}, 844: {'w': '?'}, 985: {'e': '?'}, 904: {'e': '?', 'w': '?'}, 976: {'w': '?'}, 505: {'e': '?', 'w': '?'}, 525: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 542: {'n': '?', 's': '?', 'w': '?'}, 554: {'s': '?', 'e': '?'}, 567: {'n': '?', 's': '?'}, 574: {'n': '?', 's': '?'}, 588: {'n': '?'}, 549: {'n': '?', 's': '?'}, 556: {'n': '?', 's': '?', 'e': '?'}, 600: {'n': '?', 's': '?', 'e': '?'}, 648: {'n': '?', 's': '?', 'w': '?'}, 673: {'e': '?'}, 735: {'n': '?'}, 610: {'s': '?', 'w': '?'}, 732: {'n': '?', 's': '?'}, 779: {'n': '?'}, 598: {'e': '?', 'w': '?'}, 659: {'s': '?', 'e': '?', 'w': '?'}, 754: {'w': '?'}, 665: {'n': '?', 's': '?', 'e': '?'}, 700: {'s': '?', 'w': '?'}, 813: {'n': '?', 's': '?', 'e': '?'}, 831: {'n': '?'}, 858: {'s': '?', 'e': '?', 'w': '?'}, 907: {'n': '?', 'e': '?'}, 925: {'s': '?', 'w': '?'}, 965: {'n': '?', 'e': '?'}, 980: {'s': '?', 'w': '?'}, 999: {'n': '?'}, 879: {'w': '?'}, 723: {'n': '?', 's': '?'}, 816: {'n': '?'}, 533: {'s': '?', 'w': '?'}, 539: {'n': '?', 's': '?'}, 540: {'n': '?', 'e': '?'}, 585: {'e': '?', 'w': '?'}, 682: {'w': '?'}, 560: {'s': '?', 'e': '?'}, 602: {'e': '?', 'w': '?'}, 612: {'s': '?', 'e': '?', 'w': '?'}, 635: {'e': '?', 'w': '?'}, 720: {'w': '?'}, 637: {'n': '?', 's': '?', 'e': '?'}, 650: {'e': '?', 'w': '?'}, 758: {'w': '?'}, 651: {'n': '?', 'e': '?'}, 674: {'e': '?', 'w': '?'}, 778: {'s': '?', 'w': '?'}, 815: {'n': '?', 's': '?'}, 825: {'n': '?', 's': '?'}, 854: {'n': '?'}, 510: {'n': '?', 'e': '?', 'w': '?'}, 517: {'s': '?'}, 513: {'n': '?', 'e': '?', 'w': '?'}, 532: {'n': '?', 'e': '?', 'w': '?'}, 553: {'n': '?', 's': '?'}, 593: {'s': '?'}, 568: {'n': '?', 'e': '?', 'w': '?'}, 580: {'e': '?', 'w': '?'}, 606: {'s': '?', 'e': '?', 'w': '?'}, 722: {'e': '?', 'w': '?'}, 763: {'s': '?', 'e': '?', 'w': '?'}, 846: {'e': '?'}, 826: {'n': '?'}, 608: {'n': '?', 'w': '?'}, 752: {'e': '?'}, 573: {'s': '?'}, 550: {'n': '?', 's': '?'}, 570: {'s': '?'}, 524: {'n': '?', 's': '?', 'w': '?'}, 545: {'n': '?', 's': '?'}, 565: {'n': '?', 's': '?'}, 590: {'n': '?', 's': '?'}, 625: {'n': '?', 's': '?'}, 699: {'n': '?', 's': '?'}, 809: {'n': '?'}, 526: {'s': '?', 'e': '?', 'w': '?'}, 530: {'s': '?', 'e': '?', 'w': '?'}, 577: {'n': '?', 's': '?'}, 589: {'n': '?'}, 559: {'s': '?', 'e': '?', 'w': '?'}, 569: {'e': '?', 'w': '?'}, 615: {'e': '?'}, 572: {'n': '?', 's': '?', 'w': '?'}, 621: {'n': '?', 's': '?'}, 634: {'n': '?', 's': '?', 'w': '?'}, 639: {'n': '?', 's': '?', 'w': '?'}, 653: {'n': '?', 's': '?', 'w': '?'}, 661: {'n': '?', 'w': '?'}, 788: {'e': '?', 'w': '?'}, 867: {'e': '?', 'w': '?'}, 881: {'s': '?', 'e': '?', 'w': '?'}, 898: {'n': '?'}, 884: {'e': '?'}, 690: {'e': '?', 'w': '?'}, 817: {'e': '?'}, 702: {'e': '?', 'w': '?'}, 715: {'e': '?', 'w': '?'}, 791: {'s': '?', 'e': '?', 'w': '?'}, 855: {'n': '?'}, 852: {'s': '?', 'e': '?', 'w': '?'}, 978: {'e': '?'}, 903: {'n': '?', 'w': '?'}, 951: {'e': '?'}, 636: {'e': '?'}, 607: {'s': '?', 'e': '?', 'w': '?'}, 640: {'n': '?', 'w': '?'}, 693: {'s': '?', 'e': '?', 'w': '?'}, 765: {'s': '?', 'e': '?'}, 870: {'n': '?', 'w': '?'}, 882: {'e': '?'}, 694: {'n': '?'}, 630: {'e': '?', 'w': '?'}, 755: {'e': '?', 'w': '?'}, 766: {'s': '?', 'e': '?', 'w': '?'}, 857: {'s': '?', 'e': '?', 'w': '?'}, 875: {'n': '?', 's': '?'}, 989: {'n': '?'}, 918: {'n': '?', 'e': '?', 'w': '?'}, 994: {'e': '?'}, 933: {'s': '?'}, 931: {'n': '?'}, 538: {'n': '?', 's': '?'}, 564: {'n': '?', 's': '?'}, 586: {'n': '?', 's': '?', 'w': '?'}, 619: {'n': '?', 's': '?'}, 670: {'n': '?', 's': '?'}, 707: {'n': '?', 's': '?'}, 719: {'n': '?', 's': '?', 'e': '?'}, 749: {'n': '?', 's': '?', 'e': '?'}, 822: {'s': '?', 'w': '?'}, 872: {'n': '?', 's': '?', 'e': '?'}, 968: {'w': '?'}, 906: {'n': '?'}, 859: {'n': '?', 's': '?'}, 938: {'n': '?', 's': '?'}, 975: {'n': '?', 's': '?'}, 983: {'n': '?'}, 800: {'w': '?'}, 599: {'s': '?', 'e': '?'}, 632: {'n': '?', 's': '?'}, 654: {'n': '?', 's': '?'}, 677: {'n': '?', 's': '?'}, 691: {'n': '?', 's': '?', 'w': '?'}, 704: {'e': '?', 'w': '?'}, 774: {'e': '?', 'w': '?'}, 842: {'e': '?'}, 716: {'n': '?', 's': '?', 'w': '?'}, 761: {'s': '?', 'e': '?', 'w': '?'}, 837: {'e': '?', 'w': '?'}, 948: {'e': '?', 'w': '?'}, 998: {'e': '?'}, 863: {'n': '?', 's': '?', 'w': '?'}, 873: {'s': '?', 'e': '?', 'w': '?'}, 914: {'n': '?'}, 899: {'e': '?'}, 913: {'n': '?', 's': '?'}, 922: {'n': '?', 's': '?', 'w': '?'}, 959: {'e': '?'}, 964: {'n': '?'}, 836: {'n': '?', 's': '?'}, 860: {'n': '?', 's': '?'}, 941: {'n': '?', 's': '?'}, 947: {'n': '?'}, 501: {'e': '?'}, 523: {'e': '?'}, 544: {'e': '?', 'w': '?'}, 552: {'e': '?', 'w': '?'}, 604: {'w': '?'}, 529: {'e': '?'}, 512: {'n': '?', 's': '?', 'w': '?'}, 541: {'n': '?', 'e': '?', 'w': '?'}, 546: {'n': '?', 'e': '?', 'w': '?'}, 557: {'s': '?'}, 548: {'n': '?', 'e': '?', 'w': '?'}, 605: {'n': '?', 'e': '?', 'w': '?'}, 679: {'s': '?'}, 611: {'n': '?', 'e': '?', 'w': '?'}, 624: {'n': '?', 'e': '?'}, 689: {'s': '?'}, 656: {'n': '?', 's': '?'}, 727: {'n': '?', 's': '?'}, 759: {'n': '?', 's': '?'}, 880: {'s': '?', 'w': '?'}, 886: {'e': '?'}, 655: {'s': '?'}, 543: {'s': '?'}, 534: {'n': '?', 's': '?'}, 551: {'n': '?', 's': '?', 'w': '?'}, 558: {'e': '?', 'w': '?'}, 587: {'n': '?', 'e': '?', 'w': '?'}, 594: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 622: {'w': '?'}, 649: {'s': '?'}, 641: {'n': '?', 'e': '?', 'w': '?'}, 663: {'s': '?'}, 683: {'n': '?', 'e': '?'}, 713: {'n': '?', 's': '?'}, 747: {'n': '?', 's': '?', 'w': '?'}, 839: {'s': '?', 'w': '?'}, 911: {'e': '?', 'w': '?'}, 921: {'e': '?', 'w': '?'}, 990: {'e': '?', 'w': '?'}, 991: {'e': '?'}, 828: {'e': '?'}, 592: {'e': '?', 'w': '?'}, 697: {'e': '?'}, 591: {'n': '?', 's': '?'}, 627: {'n': '?', 's': '?'}, 643: {'n': '?', 's': '?', 'w': '?'}, 668: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 706: {'n': '?', 's': '?'}, 743: {'n': '?', 's': '?', 'w': '?'}, 750: {'n': '?', 'e': '?', 'w': '?'}, 840: {'e': '?', 'w': '?'}, 887: {'e': '?', 'w': '?'}, 949: {'e': '?'}, 776: {'n': '?', 's': '?', 'w': '?'}, 805: {'e': '?', 'w': '?'}, 838: {'n': '?', 'e': '?', 'w': '?'}, 845: {'n': '?', 'e': '?'}, 895: {'s': '?', 'w': '?'}, 916: {'s': '?', 'e': '?', 'w': '?'}, 987: {'e': '?'}, 993: {'n': '?'}, 851: {'n': '?', 's': '?'}, 940: {'s': '?'}, 777: {'s': '?', 'e': '?', 'w': '?'}, 894: {'n': '?', 'e': '?'}, 935: {'n': '?', 's': '?'}, 957: {'s': '?'}, 785: {'w': '?'}, 760: {'s': '?'}, 738: {'n': '?'}, 688: {'n': '?', 'e': '?', 'w': '?'}, 745: {'s': '?', 'w': '?'}, 792: {'e': '?'}, 730: {'e': '?'}, 676: {'n': '?', 's': '?', 'e': '?'}, 686: {'w': '?'}, 726: {'n': '?', 's': '?', 'e': '?'}, 746: {'n': '?', 'w': '?'}, 771: {'s': '?', 'e': '?'}, 801: {'w': '?'}, 773: {'n': '?', 's': '?'}, 789: {'s': '?', 'e': '?'}, 795: {'n': '?', 'w': '?'}, 804: {'n': '?', 's': '?', 'e': '?', 'w': '?'}, 811: {'e': '?', 'w': '?'}, 934: {'n': '?', 'e': '?'}, 945: {'n': '?', 's': '?'}, 967: {'s': '?'}, 971: {'s': '?'}, 970: {'w': '?'}, 620: {'n': '?', 's': '?', 'w': '?'}, 692: {'s': '?', 'e': '?', 'w': '?'}, 698: {'n': '?', 's': '?', 'w': '?'}, 742: {'e': '?', 'w': '?'}, 843: {'e': '?'}, 714: {'n': '?', 'w': '?'}, 783: {'e': '?', 'w': '?'}, 871: {'s': '?', 'e': '?'}, 942: {'n': '?'}, 710: {'e': '?'}, 660: {'n': '?'}} \ No newline at end of file diff --git a/move_sell_pray/visited3.txt b/move_sell_pray/visited3.txt new file mode 100644 index 00000000..e69de29b diff --git a/move_sell_pray/warpped_info.py b/move_sell_pray/warpped_info.py new file mode 100644 index 00000000..e69de29b diff --git a/move_sell_pray/warpped_path.py b/move_sell_pray/warpped_path.py new file mode 100644 index 00000000..c1fe28a8 --- /dev/null +++ b/move_sell_pray/warpped_path.py @@ -0,0 +1,15 @@ +import time +import datetime +def cooldown_func(response): + cooldown = response + # cooldown_rounded_up = math.ceil(cooldown) + then = datetime.datetime.now() + print(then) + while (then + cooldown + .1) > datetime.datetime.now(): + print(f'Remaining cooldown new move: {(then + cooldown) - datetime.datetime.now()}', end="\r") + time.sleep(1) + # for i in range(0, cooldown_rounded_up): + # print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + # time.sleep(1) + +cooldown_func(5) \ No newline at end of file diff --git a/move_sell_pray/well-client.py b/move_sell_pray/well-client.py new file mode 100644 index 00000000..345a84d7 --- /dev/null +++ b/move_sell_pray/well-client.py @@ -0,0 +1,693 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" -d '{"name":"tiny treasure"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/drop/ +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +<<<<<<< HEAD:move_sell_pray/wrapped.py +token = 'Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +======= +token = 'Token 474a89c17aebf1820255565c58db9f9b2e2893f1' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +>>>>>>> 02f8fdb04ec09644be84d180ae36534e0ba3b751:move_sell_pray/well-client.py +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True + +curr_id = response['room_id'] +if curr_id > 500: + wrapped = True +else: + wrapped = False + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +for id_in_path in path: + # print(id_in_path) + # print(path[id_in_path]) + # print(path_reverse[id_in_path]) + visited[id_in_path] = {} + # print(visited) + for direction in path[id_in_path]: + visited[id_in_path][direction] = '?' + + +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [1,1,1] +# Go to shop function +def go_to_shop(curr_id, inventory, shop=1, come_back=False): + """ + parms curr_id: ID of current location + parms inventory: Current items in inventory + parms shop: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, shop) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + # Gets direction from the revered path w, e, s or n + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + # Create data to send through post, direction and ID of next room + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + # get the reverse in case come_back = True + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + # Move + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + # increment i + i+=1 + # Cooldown + cooldown_func(next_room) + + sold = False + # iterate through items to sell each item + for i in inventory: + # if item has the word treasure sell it + if 'treasure' in i: + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + if "{}" in response_examin['attributes']: + item_to_sell = '{"name":"'+i+'", "confirm":"yes"}' + response_sell = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/sell/', + headers=headers, data=item_to_sell).json() + print(f'Item {i} sold\n') + sold = True + cooldown_func(response_sell) + # Come to where we started + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + # Get current room id + curr_id = next_room['room_id'] + + return sold, shop + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate +shrined = [0,0,0] +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + else: + continue + # traversal_path = g.bfs(curr_id, sh) + + dash_fly(curr_id, sh) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = response_shrine['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers=headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_snitch(curr_id, wishing_well=55, alternative=False): + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + snitch_room_copy = '' + while True: + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + # snitch_room_copy = int(snitch_room) + if snitch_room_copy == snitch_room: + continue + f = open("snitch_room.txt","w") + f.write(str(snitch_room)) + f.close() + snitch_room_copy = int(snitch_room) + + + + return snitch_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def go_to_transmogrifier(curr_id, destination=495): + + print('=================== Going to the transmogrifier ===================') + transmogrifier_room = dash_fly(curr_id, destination) + encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + n = 0 + + for i in inventory: + # if item has the word treasure sell it + data_items = '{"name":"'+ i +'"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers, data=data_items).json() + print('Exmaning items\n') + print(response_examin) + cooldown_func(response_examin) + print(response_examin['attributes']) + if "{}" not in response_examin['attributes']: + print(f'item: {i}') + while True: + print(inventory) + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify']: + # player.travel(cmds[0], True) + if len(cmds[:]) > 1: + t = cmds[1] + " " + cmds[2] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + + + # if "{}" not in response_examin['attributes']: + + # transmogrifier_data = '{"name":"'+i+'"}' + # transmogrifier_response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/transmogrify/', + # headers=headers, data=transmogrifier_data).json() + # print(f'Item {i}\n') + # sold = True + # print(transmogrifier_response) + # cooldown_func(transmogrifier_response) + + # n += 1 + # print(n) + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # for i in inventory: + # print(f'item: {i}') + # while True: + # print(inventory) + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["examine", "wear", "undress","choose"]: + # # player.travel(cmds[0], True) + # if cmds[0] == 'choose': + # i = cmds[1] + # data = '{"name":"[' + str(i) +']"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + # print(take_examin) + # elif cmds[0] == "q": + # break + + return destination + +def warp(): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + cooldown_func(response) + print(response) + # while True: + # cmds = input("-> ").lower().split(" ") + # if cmds[0] in ["n", "s", "e", "w"]: + # # player.travel(cmds[0], True) + # data = '{"direction":"' + str(cmds[0]) +'"}' + + # next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + # headers=headers, data=data).json() + # cooldown_func(next_room) + # print(next_room) + # elif cmds[0] in ["examine", "take"]: + # if len(cmds[1:]) > 1: + # t = cmds[1] + " " +cmds[2] + # else: + # t = cmds[1] + + # data = '{"name":"' + str(t) +'"}' + + # take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + # headers=headers, data=data).json() + # cooldown_func(take_examin) + + # print(take_examin) + + # elif cmds[0] == "mine": + + # message = proof_of_work(headers) + # print(f'Mining message: {message}') + # mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + # headers=headers).json() + + # print('================ Mined new coin ===============') + # print(mine_response) + # cooldown_func(mine_response) + + # elif cmds[0] == 'pray': + # data_items = '{"name":"Wishing Well"}' + # response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + # headers=headers, data=data_items).json() + # well_desc = response_examin['description'].split('\n') + # print(f'well_desc: {well_desc}') + # # code = response['description'] + # filename = 'wishing_well.txt' + # well_desc.pop() + # well_desc.append('00010011') + # with open(filename, 'w') as f: + # for line in well_desc[2:]: + # f.write(line) + # f.write('\n') + # print('=================== DECODING MESSAGE ====================') + # ls8 = CPU() + # ls8.load(filename) + # mine_room = ls8.run() + # mine_room = int(mine_room.replace(" ","")) + # print(mine_room) + + # elif cmds[0] == "q": + # break + + +def find_new_move_room(visited, current_room, curr_id, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped): + sold = False + # Go to shop + # mine_room = force_got_to(curr_id, 111) # <--------------------------FORCE MINE--------------------------------- + # new_id = go_to_wishing_well_mine(curr_id) # <-------------------------- FROCE WISH AND MINE ------------------------- + + # if wrapped == True: + # print('=============== lets wish and mine =============') + # new_id = go_to_wishing_well_mine(curr_id) + + if wrapped == False: + warp() + wrapped = True + # Wishing Well + + elif wrapped == True: + curr_id = go_to_shrine(curr_id) + print('========================= Getting that snitch ==================') + curr_id = dash_fly(curr_id, 555) + while True: + curr_id = go_to_wishing_well_snitch(curr_id, wishing_well=555) + + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + if ('snitch' in next_room['players']) or ('snitch' in next_room['title']) or ('snitch' in next_room['description']) | (next_room_id == 986): + print(f'Room Info: {next_room}') + while True: + + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify', 'take']: + # player.travel(cmds[0], True) + if len(cmds[1:]) == 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[1:]) == 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + # if (len(next_room['items']) > 0): + # weights = [] + + # for i in next_room['items']: + # data_items = '{"name":"'+ i +'"}' + # response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + # headers=headers, data=data_items).json() + # print('Exmaning items\n') + # print(response_examin) + # cooldown_func(response_examin) + + # # if (armor == None) | (shoes == None): + + # # data_wear = '{"name":"'+ i +'"}' + # # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # # headers=headers, data=data_wear).json() + # # cooldown_func(response_wear) + # # print(response_wear) + # # print(f'Wore item: {i}\n') + # # # next_room['items'].remove(i) + # # print('Getting status after wearing\n') + # # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + # # print(f'Armore: {armor}, Shoes: {shoes}') + # if "{}" not in response_examin['attributes']: + # if (encumbrance + response_examin['weight']) < strength: + # name_item = i + + # data_items = '{"name":"' + name_item + '"}' + + # response_items = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + # headers=headers, data=data_items).json() + # print('Picked up item\n') + # cooldown_func(response_items) + # encumbrance += response_examin['weight'] + # inventory.append(name_item) + # elif (armor == None) | (shoes == None): + + # data_wear = '{"name":"'+ i +'"}' + # response_wear = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/wear/', + # headers=headers, data=data_wear).json() + # cooldown_func(response_wear) + # print(f'Wore item: {i}\n') + # next_room['items'].remove(i) + # print('Getting status after wearing\n') + # encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() + + + + # if (encumbrance == strength) | (strength - encumbrance) == 1: + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while s.size() > 0: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped = find_new_move_room(visited, + curr_room, + curr_id, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/move_sell_pray/wishing_well.txt b/move_sell_pray/wishing_well.txt new file mode 100644 index 00000000..e23dce06 --- /dev/null +++ b/move_sell_pray/wishing_well.txt @@ -0,0 +1,167 @@ +10000010 +00000001 +01001101 +01001000 +00000001 +10000010 +00000001 +01101001 +01001000 +00000001 +10000010 +00000001 +01101110 +01001000 +00000001 +10000010 +00000001 +01100101 +01001000 +00000001 +10000010 +00000001 +00100000 +01001000 +00000001 +10000010 +00000001 +01111001 +01001000 +00000001 +10000010 +00000001 +01101111 +01001000 +00000001 +10000010 +00000001 +01110101 +01001000 +00000001 +10000010 +00000001 +01110010 +01001000 +00000001 +10000010 +00000001 +00100000 +01001000 +00000001 +10000010 +00000001 +01100011 +01001000 +00000001 +10000010 +00000001 +01101111 +01001000 +00000001 +10000010 +00000001 +01101001 +01001000 +00000001 +10000010 +00000001 +01101110 +01001000 +00000001 +10000010 +00000001 +00100000 +01001000 +00000001 +10000010 +00000001 +01101001 +01001000 +00000001 +10000010 +00000001 +01101110 +01001000 +00000001 +10000010 +00000001 +00100000 +01001000 +00000001 +10000010 +00000001 +01110010 +01001000 +00000001 +10000010 +00000001 +01101111 +01001000 +00000001 +10000010 +00000001 +01101111 +01001000 +00000001 +10000010 +00000001 +01101101 +01001000 +00000001 +10000010 +00000001 +00100000 +01001000 +00000001 +10000010 +00000001 +10001111 +10000010 +00000010 +00011001 +10101000 +00000001 +00000010 +10000010 +00000010 +00111101 +10101011 +00000001 +00000010 +01001000 +00000001 +10000010 +00000001 +01001000 +10000010 +00000010 +11011000 +10101000 +00000001 +00000010 +10000010 +00000010 +01111110 +10101011 +00000001 +00000010 +01001000 +00000001 +10000010 +00000001 +00100010 +10000010 +00000010 +00001110 +10101000 +00000001 +00000010 +10000010 +00000010 +00110100 +10101011 +00000001 +00000010 +01001000 +00000001 +00010011 diff --git a/move_sell_pray/wrapped2.py b/move_sell_pray/wrapped2.py new file mode 100644 index 00000000..a8e893b4 --- /dev/null +++ b/move_sell_pray/wrapped2.py @@ -0,0 +1,485 @@ +import json +from path import my_dict as path +from graph import Graph +g = Graph() +import requests +import sys +import random +from util import Stack, Queue +import copy +import time +import math +import json +from cpu import CPU +from mine import valid_proof, proof_of_work + + + + +path_reverse = {} +for i in path: + path_reverse[i] = {y: x for x, y in path[i].items()} +g.vertices = path_reverse + +def cooldown_func(response): + cooldown = response["cooldown"] + cooldown_rounded_up = math.ceil(cooldown) + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown new move: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) +# curl -X POST -H 'Authorization: Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' -H "Content-Type: application/json" -d '{"name":"nice jacket"}' https://lambda-treasure-hunt.herokuapp.com/api/adv/take/ +# curl -X POST -H 'Authorization: Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' -H "Content-Type: application/json" https://lambda-treasure-hunt.herokuapp.com/api/adv/status/ +token = 'Token b9ac3ccda7673a719af4c4305ec9efacdef4c161' #6a879ef0d8d6851f96f1d1144cd3836007c07225 +token_2 = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} +headers_2 = { + 'Authorization': token_2, +} + +response = requests.get(url + '/api/adv/init/', headers=headers) +response_2 = requests.get(url + '/api/adv/init/', headers=headers_2).json() + +response = response.json() +print(response) +cooldown = response["cooldown"] +headers = { + 'Authorization': token, + 'Content-Type': 'application/json', +} +moving = True +curr_id = response['room_id'] +curr_id_1 = response['room_id'] +curr_id_2 = response_2['room_id'] +if curr_id_1 > 500: + wrapped_curr_id_1 = True +else: + wrapped_curr_id_1 = False + +if curr_id_2 > 500: + wrapped_curr_id_2 = True +else: + wrapped_curr_id_2 = False + +cooldown_func(response) + +s = Stack() +visited = {curr_id: {}} +curr_room = response +reverse = {'n': 's', + 'e': 'w', + 's': 'n', + 'w': 'e'} +for direction in curr_room['exits']: + print(direction) + visited[curr_id][direction] = '?' +for id_in_path in path: + # print(id_in_path) + # print(path[id_in_path]) + # print(path_reverse[id_in_path]) + visited[id_in_path] = {} + # print(visited) + for direction in path[id_in_path]: + visited[id_in_path][direction] = '?' + + +print(f'Initialize: {visited}\n') + +traversal_path = [] +room_info = {curr_id: curr_room} + +def unvisited(graph): + for i in graph: + if '?' in graph[i].values(): + return True + return False + +def response_func(what='status'): + response_status = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/status/', + headers=headers).json() + cooldown_func(response_status) + encumbrance = response_status['encumbrance'] + strength = response_status['strength'] + inventory = response_status['inventory'] + gold = response_status['gold'] + armor = response_status['bodywear'] + shoes = response_status['footwear'] + name = response_status['name'] + abilities = response_status['abilities'] + has_mined = response_status['has_mined'] + + return encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined + +# Get status and update variables +encumbrance, strength, inventory, gold, armor, shoes, name, abilities, has_mined = response_func() +print(f'Name: {name}') + + +Initial_name = 'User 20677' +shrined = [1,1,1] +# Go to shop function + +def go_to_pirate(curr_id, pyrate=467, come_back=False): + """ + parms curr_id: ID of current location + parms pyrate: ID of shop location + parms come_back: Boolean, if True goes back to where it started, + False continues from shop + Return sold, curr_id: sold: True if it sold any items, curr_id: New location ID + """ + # find shortest path using Breadth First Search. Returns list of ids [1,4,60] + traversal_path = g.bfs(curr_id, pyrate) + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + + data_name = '{"name":"[MALI-BOT]", "confirm":"aye"}' + + response_name = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/change_name/', + headers=headers, data=data_name).json() + print(response_name['messages']) + + + if come_back == True: + for i in temp_list: + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=i).json() + cooldown_func(next_room) + + print("NAME CHANGED ============= Let's Mine!!!\n") + curr_id = next_room['room_id'] + return pyrate + +def go_to_shrine(curr_id, shrine=[374,461,22]): + for ind in range(len(shrined)): + print(shrined) + if shrined[ind] == 0: + sh = shrine[ind] + + traversal_path = g.bfs(curr_id, sh) + + i = 0 + temp_list = [] + while i + 1 < len(traversal_path): + print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + data = '{"direction":"' + direction + '", "next_room_id":"' + str(traversal_path[i+1]) + '"}' + reverse_data = '{"direction":"' + reverse[direction] + '", "next_room_id":"' + str(traversal_path[i]) + '"}' + temp_list.insert(0,reverse_data) + next_room = requests.post(url + '/api/adv/fly/', headers=headers, data=data).json() + i +=1 + cooldown_func(next_room) + response_shrine = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/pray/', + headers=headers).json() + print('=========Shrined!=================\n') + cooldown_func(response_shrine) + shrined[ind] = 1 + print(shrined) + print(response_shrine) + curr_id = next_room['room_id'] + return curr_id +import itertools +def dash_fly(curr_id,destination, headers=headers): + traversal_path = g.bfs(curr_id, destination) + i = 0 + ids = [] + directions = [] + print(len(traversal_path)) + print(f'traversal_path: {traversal_path}') + while i + 1 < len(traversal_path): + # print(traversal_path[i]) + direction = path_reverse[traversal_path[i]][traversal_path[i+1]] + directions.append(direction) + ids.append(traversal_path[i+1]) + i += 1 + print(len(ids)) + print(len(directions)) + print('Getting listy') + listy = [list(v) for g,v in itertools.groupby(directions)] + print(ids) + print(listy) + temp_length = 0 + counter = 0 + for i in range(len(listy)): + length = len(listy[i]) + temp_length += length + # print(ids[counter:temp_length]) + ids_str = str(ids[counter:temp_length]).strip('[]').replace(" ", "") + # print(ids_str) + direction = listy[i][0] + print(directions) + print(direction) + print(ids_str) + num_rooms = str(len(ids[counter:temp_length])) + counter = temp_length + if length > 1: + print('DASHING') + dash_data = '{"direction":"'+ direction +'", "num_rooms":"' + num_rooms + '", "next_room_ids":"' + str(ids_str) + '"}' + print(dash_data) + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/dash/', + headers, data=dash_data).json() + print(next_room) + print(f"room: {next_room['room_id']}") + print(f"Name: {name}") + cooldown_func(next_room) + else: + print('FLYING') + fly_data = '{"direction":"' + direction + '", "next_room_id":"' + ids_str + '"}' + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=fly_data).json() + print(f"room: {next_room['room_id']}") + cooldown_func(next_room) + + return destination + + +def go_to_wishing_well_snitch(curr_id_1, curr_id_2, wishing_well=55, alternative=False): + new_room_id = dash_fly(curr_id_2, wishing_well, headers=headers_2) + + print('===================== Wishing Well ===================') + # name_of_well = next_room['Wishing Well'] + snitch_room_copy = '' + while True: + data_items = '{"name":"Wishing Well"}' + response_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/examine/', + headers=headers_2, data=data_items).json() + well_desc = response_examin['description'].split('\n') + print(f'well_desc: {well_desc}') + # code = response['description'] + filename = 'wishing_well.txt' + well_desc.pop() + well_desc.append('00010011') + with open(filename, 'w') as f: + for line in well_desc[2:]: + f.write(line) + f.write('\n') + print('=================== DECODING MESSAGE ====================') + ls8 = CPU() + ls8.load(filename) + snitch_room = ls8.run() + snitch_room = int(snitch_room.replace(" ","")) + if snitch_room_copy == snitch_room: + continue + f = open("snitch_room.txt","w") + f.write(str(visited)) + f.close() + snitch_room_copy = int(snitch_room) + print('=================== Going to to get snitch ===================') + snitch_room = dash_fly(curr_id_1, snitch_room, headers=headers) + + data = '{"name":"golden snitch"}' + + take_snitch = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/take/', + headers=headers, data=data).json() + + + # cooldown_func(take_snitch) + print('================ snitch grabbed ===============') + print(take_snitch) + + return snitch_room + +def force_got_to(curr_id, destination=445): + + print('=================== Going to mine ===================') + mine_room = dash_fly(curr_id, destination) + + message = proof_of_work(headers) + print(f'Mining message: {message}') + mine_response = requests.get('https://lambda-treasure-hunt.herokuapp.com/api/bc/get_balance/', + headers=headers).json() + + print('================ Mined new coin ===============') + print(mine_response) + cooldown_func(mine_response) + return destination + +def warp(headers): + response = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers).json() + # response_2 = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/warp/', headers=headers_2).json() + cooldown_func(response) + curr_id = response['room_id'] + # curr_id = response_2['room_id'] + print(response) + return curr_id + + + +def find_new_move_room(visited, current_room, curr_id_1, curr_id_2, encumbrance, + strength, inventory, gold, armor, shoes, name, + abilities, has_mined, wrapped_curr_id_1, wrapped_curr_id_2): + sold = False + + if wrapped_curr_id_1 == False: + curr_id_1 = warp(headers) + wrapped_curr_id_1 = True + # Wishing Well + elif wrapped_curr_id_2 == False: + curr_id_2 = warp(headers_2) + wrapped_curr_id_2 = True + elif (wrapped_curr_id_2 == True) & (wrapped_curr_id_1 == True): + print('========================= Getting that snitch ==================') + while True: + curr_id_1, curr_id_2 = go_to_wishing_well_snitch(curr_id_1, curr_id_2, wishing_well=555) + + + if curr_id not in visited: + for direction in ['n','s','w','e']: + print(direction) + visited[curr_id][direction] = '?' + not_in_path = False + if curr_id in path: + known_ids = path[curr_id] + print(f'known_ids: {known_ids}') + else: + not_in_path = True + room_exits = visited[curr_id] + print(f'room_exits: {room_exits}\n') + dirs = [] + for direction in room_exits: + dirs.append(direction) + random.shuffle(dirs) + for direction in dirs: + if room_exits[direction] == '?': + + if not_in_path: + data = '{"direction":"' + direction + '"}' + else: + next_room_id_pred = known_ids[direction] + print(f'next_room_id_pred: {next_room_id_pred}') + data = '{"direction":"' + direction + '", "next_room_id":"' + str(next_room_id_pred) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', + headers=headers, data=data).json() + cooldown_func(next_room) + + next_room_id = next_room['room_id'] + if ('snitch' in next_room['players']) or ('snitch' in next_room['title']) or ('snitch' in next_room['description']) | (next_room_id == 986): + print(f'Room Info: {next_room}') + while True: + + cmds = input("-> ").lower().split(" ") + if cmds[0] in ["examine", "wear", "undress","choose",'transmogrify', 'take']: + # player.travel(cmds[0], True) + if len(cmds[1:]) == 2: + t = cmds[1] + " " + cmds[2] + elif len(cmds[1:]) == 3: + t = cmds[1] + " " + cmds[2] + " " + cmds[3] + # if cmds[0] == 'examine': + # data = '{"name":"' + str(i) +'"}' + # else: + data = '{"name":"' + str(t) +'"}' + + take_examin = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/'+cmds[0]+'/', + headers=headers, data=data).json() + cooldown_func(take_examin) + print(take_examin) + elif cmds[0] == "q": + break + + + return direction, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped_curr_id_1, wrapped_curr_id_2 + + return None, None, None, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped_curr_id_1, wrapped_curr_id_2 + +def go_back(traversal_path, visited, curr_room): + print("----------------GOING BACK-------------------------") + while True: + next_move = s.pop() + print(str(next_move[0])) + traversal_path.append(next_move[0]) + print(str(next_move[1])) + data = '{"direction":"' + next_move[0] + '", "next_room_id":"' + str(next_move[1]) + '"}' + + next_room = requests.post('https://lambda-treasure-hunt.herokuapp.com/api/adv/fly/', headers=headers, data=data).json() + cooldown_func(next_room) + + print(f"{next_room['messages']}\n") + + next_room_id = next_room['room_id'] + + if '?' in visited[next_room_id].values(): + return next_room['room_id'] + if s.size() == 0: + return next_room['room_id'] + +s.push(curr_id) +n = 0 +while s.size() > 0: + print(n) + if n == 0: + s.pop() + n += 1 + cooldown = response["cooldown"] + print(f"You're in room {curr_id}\n") + + cooldown_rounded_up = math.ceil(cooldown) + + for i in range(0, cooldown_rounded_up): + print(f'Remaining cooldown 1: {cooldown_rounded_up - i})', end="\r") + time.sleep(1) + + if direction == "exit": + moving = False + + if curr_id not in visited: + print('not in visited') + visited[curr_id] = {} + for direction in curr_room['exits']: + visited[curr_id][direction] = '?' + next_move, next_room, next_room_id, encumbrance, strength, inventory, gold, armor, shoes, name, abilities, wrapped_curr_id_1, wrapped_curr_id_2 = find_new_move_room(visited, + curr_room, + curr_id_1, curr_id_2, + encumbrance, + strength, + inventory, + gold, + armor, + shoes, + name, + abilities, + has_mined, + wrapped_curr_id_1, + wrapped_curr_id_2 + ) + + if next_move == None: + print(f"Reached a deadend:\n") + curr_id = go_back(traversal_path, visited, curr_room) + continue + else: + traversal_path.append(next_move) + print(f"Going {next_move} towards {next_room_id}\n") + visited[curr_id][next_move] = next_room_id + room_info[curr_id]['exit_id'] = visited[curr_id] + if next_room_id not in visited: + visited[next_room_id] = {} + for direction in next_room['exits']: + visited[next_room_id][direction] = '?' + visited[next_room_id][reverse[next_move]] = curr_id + + room_info[next_room_id] = next_room + room_info[next_room_id]['exit_id'] = visited[next_room_id] + + s.push([reverse[next_move], curr_id]) + curr_id = next_room_id + print("======================== Moved to new room =========================") + print(f'Total rooms visited: {len(visited)}') + + # Save map info + f = open("visited.txt","w") + f.write(str(visited)) + f.close() + + f = open("room_info.txt","w") + f.write(str(room_info)) + f.close() \ No newline at end of file diff --git a/traversal.py b/traversal.py new file mode 100644 index 00000000..45cca329 --- /dev/null +++ b/traversal.py @@ -0,0 +1,211 @@ +# Initialize +import requests +import sys +import time +import math +import random +import pickle + +token = 'Token 6a879ef0d8d6851f96f1d1144cd3836007c07225' +url = 'https://lambda-treasure-hunt.herokuapp.com' +headers = { + 'Authorization': token, +} + +response = requests.get(url + '/api/adv/init/', headers=headers).json() + +print(response) + +cooldown = response["cooldown"] # is this right? +exits = response['exits'] + +time.sleep(cooldown) + +headers['Content-Type'] = 'application/json' + +class Queue(): + def __init__(self): + self.queue = [] + def enqueue(self, value): + self.queue.append(value) + def dequeue(self): + if self.size() > 0: + return self.queue.pop(0) + else: + return None + def size(self): + return len(self.queue) + +def load(): + print('Checking if map saved...') + + try: + with open('map.pickle', 'rb') as f: + graph = pickle.load(f) + print(f"Map contains {len(graph)} nodes.") + print('Map loaded\n') + except FileNotFoundError: + graph = {} + + try: + with open('rooms.pickle', 'rb') as f: + room_list = pickle.load(f) + print('Map loaded\n') + except FileNotFoundError: + room_list = {} + + return graph, room_list + +def backtrack_path(graph, current_room): + ''' + Use BFS to find the closest room with unexplored exits + Return a path from the current room to the target room + Path is a list of directions + ''' + + # Create an empty queue + q = Queue() + + # Add a PATH TO the starting vertex_id to the queue + q.enqueue( [(current_room, None)] ) + #Create an empty set + visited = set() + # While the queue is not empty + while q.size() > 0: + #Dequeue the first path + path = q.dequeue() + # grab the last vertex from the path + v = path[-1][0] + # check if it's the target + if '?' in graph[v].values(): + # if so, return the path + path = [i[1] for i in path[1:]] + print() + print(f"Path: {path}") + return path + if v not in visited: + visited.add(v) + for key, val in graph[v].items(): + # make a copy of the path before adding + path_copy = path.copy() + # print(f"Path copy: {path_copy}") + path_copy.append((val, key)) + q.enqueue(path_copy) + +def unexplored_exits(graph, current_room_id): + return [k for k, v in graph[current_room_id].items() if v=='?'] + +def wait(cooldown): + cooldown = math.ceil(cooldown) + + for i in range(0, cooldown): + print(f'Remaining cooldown: {cooldown - i}...', end="\r") + time.sleep(1) + +def print_direction(direction): + print('---' * 10) + print(f"You move to the {direction}") + print('---'*10) + +def travel(direction, room=None): + if room is not None: + data = {"direction": f'{direction}', "next_room_id": f"{room}"} + # data = '{"direction":"' + direction + '"}' + else: + data = {"direction": f'{direction}'} + + response = requests.post(url + '/api/adv/move/', headers=headers, json=data).json() + cooldown = response["cooldown"] + + print_direction(direction) + print(response) + + wait(cooldown) + return(response) + +# Use load() to read in pickled files +graph, room_list = load() + +visited = set() +traversal_path = [] +opposite = {'s': 'n', 'n': 's', 'w': 'e', 'e': 'w'} + +source = None +old_room = None +no_back = True + +# moving = True +# while len(visited) < 10: +while len(graph) < 500: + # Mark current room as visited + current_room = response['room_id'] + exits = response['exits'] + visited.add(current_room) + + if current_room not in graph: + graph[current_room] = {} + for e in exits: + graph[current_room][e] = '?' + + print(f"Your map has {len(graph)} rooms") + + if current_room not in room_list: + room_list[current_room] = response + + if len(visited) == 500: + break + + if len(visited) % 25 == 0: + with open('map.pickle', 'wb') as f: + pickle.dump(graph, f) + with open('rooms.pickle', 'wb') as f: + pickle.dump(room_list, f) + + unexplored_exits_list = unexplored_exits(graph, current_room) + + # randomly select an exit and travel in that direction + if len(unexplored_exits_list)>0: + # Pick a random unexplored direction and travel that way + direction = random.choice(unexplored_exits_list) + previous_room = current_room + if graph[current_room][direction] != '?': + room = graph[current_room][direction] + response = travel(direction, room) + else: + response = travel(direction) + current_room = response['room_id'] + exits = response['exits'] + + if current_room not in graph: + graph[current_room] = {} + for e in exits: + graph[current_room][e] = '?' + + graph[previous_room][direction] = current_room + graph[current_room][opposite[direction]] = previous_room + + traversal_path.append(direction) + + else: + print() + print("Backtracking...") + backtrack_path_list = backtrack_path(graph, current_room) + print(f"Backtrack list: {backtrack_path_list}") + for d in backtrack_path_list: + current_room = response['room_id'] + if graph[current_room][d] != '?': + room = graph[current_room][d] + response = travel(d, room) + else: + response = travel(d) + # travel(d) + traversal_path.append(d) + # no_back = False + +print(graph) +print('Map complete!\n') +with open('map.pickle', 'wb') as f: + pickle.dump(graph, f) +with open('rooms.pickle', 'wb') as f: + pickle.dump(room_list, f) +print(traversal_path) \ No newline at end of file diff --git a/traversal.txt b/traversal.txt new file mode 100644 index 00000000..be263638 --- /dev/null +++ b/traversal.txt @@ -0,0 +1 @@ +['w', 'w', 'n', 's', 's', 'e', 'w', 's', 'e', 'e', 'w', 'w', 'w', 's', 'e', 'e', 'e', 'w', 'w', 'w', 'n', 'w', 'w', 'w', 'n', 'w', 'n', 'n', 's', 'e', 'w', 's', 'e', 'e', 'e', 'e', 'w', 'w', 'n', 'e', 'e', 'w', 'w', 's', 'w', 'w', 'n', 'n', 'w', 'w', 'n', 'w', 's', 'n', 'n', 's', 'w', 's', 's', 'w', 'w', 'n', 's', 'e', 'e', 's', 'e', 'e', 'e', 'w', 'w', 'n', 'e', 'e', 'w', 'w', 's', 'w', 's', 's', 'w', 'w', 'w', 'w', 'e', 'e', 'e', 'n', 'w', 'n', 'w', 'w', 'w', 'w', 'w', 'e', 'e', 'e', 'e', 'n', 'n', 's', 'w', 'e', 's', 'e', 's', 'w', 'w', 'e', 'e', 'e', 's', 'e', 'n', 'e', 'e', 'w', 's', 's', 'e', 's', 'e', 's', 'e', 'e', 'e', 'e', 'e', 'e', 'w', 'w', 'w', 'w', 'w', 'w', 's', 'e', 's', 's', 's', 'n', 'e', 's', 'e', 'w', 's', 's', 'e', 's', 'n', 'w', 's', 'n', 'n', 'e', 'e', 'w', 'w', 'n', 'n', 'w', 'n', 'w', 's', 'w', 's', 's', 'w', 'n', 'n', 'n', 'n', 'n', 'n', 'w', 'e', 'n', 'w', 'w', 's', 's', 'e', 's', 'w', 'e', 's', 'w', 'e', 'n', 'n', 'w', 'w', 's', 'n', 'e', 'n', 'n', 'w', 'w', 'w', 'w', 'n', 'n', 's', 's', 'e', 'e', 'e', 's', 'n', 'e', 'e', 'e', 'e', 'e', 'w', 's', 's', 's', 's', 'w', 's', 's', 'w', 's', 'n', 'w', 's', 's', 'e', 'e', 's', 's', 'n', 'n', 'w', 's', 's', 'n', 'n', 'w', 'w', 's', 'w', 'w', 'e', 'e', 's', 'n', 'n', 'w', 'e', 'e', 's', 's', 's', 'n', 'n', 'n', 'n', 'n', 'w', 's', 'n', 'e', 'e', 'e', 'n', 'e', 's', 'e', 's', 'e', 'w', 's', 's', 's', 'n', 'n', 'n', 'n', 'w', 'n', 'e', 'n', 'e', 'n', 'e', 'e', 'w', 's', 'e', 'e', 'n', 'e', 'e', 'e', 'n', 'e', 'e', 'e', 'w', 'w', 'w', 's', 'e', 'w', 'w', 's', 'e', 'e', 's', 'n', 'e', 'w', 'w', 'w', 'n', 'w', 'w', 's', 'e', 's', 'e', 'w', 's', 'e', 'w', 'w', 'e', 's', 's', 'w', 's', 'n', 'e', 's', 's', 'n', 'n', 'n', 'e', 'w', 'n', 'n', 'n', 'w', 'w', 's', 'e', 'w', 'n', 'w', 'n', 'w', 'w', 'n', 'n', 'w', 'n', 'w', 'n', 'n', 'w', 'n', 'n', 'n', 'n', 'e', 'e', 's', 'e', 'e', 'e', 'n', 'e', 'e', 's', 'e', 'w', 'n', 'w', 'w', 's', 'w', 's', 's', 'e', 's', 'e', 'e', 'e', 'e', 'n', 'n', 'e', 'n', 's', 'e', 's', 'e', 'e', 'n', 'w', 'e', 's', 'w', 's'] \ No newline at end of file