From a9aab11c1caa71dfd7b44d3f4a0d7eb239ba8eb6 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Fri, 19 Apr 2013 15:07:05 +0300 Subject: Fixed some grammatical and spelling errors. --- weatbag/tiles/s2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s2.py b/weatbag/tiles/s2.py index 13b6d83..474eb55 100644 --- a/weatbag/tiles/s2.py +++ b/weatbag/tiles/s2.py @@ -5,7 +5,7 @@ class Tile: def describe(self): print("To the South, the foliage begins to thin and the path winds " - "forwards up a steep hillside. A rugged granite rockformation tops " + "forward up a steep hillside. A rugged granite rock formation tops " "the hill, its centerpiece two slabs of rock leaning together " "to form a crude arch." ) -- cgit v1.3 From 41604b6535155bc71d05c93419e4639395d7a9d4 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Fri, 19 Apr 2013 15:08:59 +0300 Subject: Another minor grammar fix. --- weatbag/tiles/w1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/w1.py b/weatbag/tiles/w1.py index b880840..e68fc73 100644 --- a/weatbag/tiles/w1.py +++ b/weatbag/tiles/w1.py @@ -11,7 +11,7 @@ class Tile: def leave(self, player, direction): if direction=='w': - print("You've forgotten how to swim") + print("You've forgotten how to swim.") return False return True -- cgit v1.3 From d345a724c004cf2622e67949eb35d549f78d134f Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 00:21:17 +0300 Subject: added south leave text for e1 --- weatbag/tiles/e1.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'weatbag') diff --git a/weatbag/tiles/e1.py b/weatbag/tiles/e1.py index 39f73e5..55fe4cc 100644 --- a/weatbag/tiles/e1.py +++ b/weatbag/tiles/e1.py @@ -23,3 +23,10 @@ class Tile: print("Reaching up, you pick the berries.") else: print("There are no berries here.") + + def leave(self,player,direction): + if direction == 's': + print("You decide the path is too boring for you,\n" + "so you follow the stream south, looking for adventure!") + input() + return True -- cgit v1.3 From 3541efc01e9519743ba96a798f39ca03b352493c Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 01:23:16 +0300 Subject: Added first bug tile. --- weatbag/tiles/s1e1.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 weatbag/tiles/s1e1.py (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py new file mode 100644 index 0000000..9f96e6b --- /dev/null +++ b/weatbag/tiles/s1e1.py @@ -0,0 +1,21 @@ +from weatbag import words +import weatbag + +class Tile: + def __init__(self): + self.contents = {'bug': 1} + pass + + def describe(self): + print("There is a stream here.\n" + "It runs from South to North.") + + if self.contents['bug'] > 0: + print("You see a huge ugly bug rush past you, " + "following the river south.") + self.contents['bug'] -= 1 + else: + print("You remember this is where you saw that bug going south") + + def action(self, player, do): + pass -- cgit v1.3 From dc0b9a548f9a78f3beeb5989f0682b0a819b5594 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 01:27:24 +0300 Subject: Fixed leave bug in s1e1 and modified output text. --- weatbag/tiles/s1e1.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 9f96e6b..74a0aa0 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -11,11 +11,19 @@ class Tile: "It runs from South to North.") if self.contents['bug'] > 0: - print("You see a huge ugly bug rush past you, " + print("You see a huge, ugly bug rush past you, " "following the river south.") self.contents['bug'] -= 1 else: - print("You remember this is where you saw that bug going south") + print("You remember this is where you saw that bug going south.") def action(self, player, do): pass + + def leave(self, player, direction): + if direction == 's': + print("Bugs are the enemy and must be crushed!" + "So you decide to follow the bug upstream.") + return True + else: + return True -- cgit v1.3 From b69c7bfa3d7d40c1c9d91ff424194a14e4e2a62f Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 01:38:26 +0300 Subject: Added leave text if not going after the bug. --- weatbag/tiles/s1e1.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 74a0aa0..ff09753 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -4,26 +4,32 @@ import weatbag class Tile: def __init__(self): self.contents = {'bug': 1} + self.bug_leaves_this_time = True pass def describe(self): - print("There is a stream here.\n" + print("There is a stream here. " "It runs from South to North.") if self.contents['bug'] > 0: print("You see a huge, ugly bug rush past you, " - "following the river south.") + "following the river South.") self.contents['bug'] -= 1 else: - print("You remember this is where you saw that bug going south.") + print("You remember this is where you saw that bug going South.") def action(self, player, do): pass def leave(self, player, direction): if direction == 's': - print("Bugs are the enemy and must be crushed!" + print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") return True else: + if self.bug_leaves_this_time: + print("Bugs do not interest you very much.\n" + "Lets get out of here.") + self.bug_leaves_this_time = False + input() return True -- cgit v1.3 From ccf803ea46650c157c717336a5f0e2c217b4f5d4 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 21:24:57 +0300 Subject: Fixed bug I had made on leave method for e1. I wasn't returning True/False for North, East, West. --- weatbag/tiles/e1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/e1.py b/weatbag/tiles/e1.py index 55fe4cc..5a0cded 100644 --- a/weatbag/tiles/e1.py +++ b/weatbag/tiles/e1.py @@ -27,6 +27,8 @@ class Tile: def leave(self,player,direction): if direction == 's': print("You decide the path is too boring for you,\n" - "so you follow the stream south, looking for adventure!") + "so you follow the stream south, looking for adventure!") input() return True + else: + return True -- cgit v1.3 From bd2a553a492a19dfc122faeb64a441358a13ee31 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 21:29:48 +0300 Subject: added a pause after leave text --- weatbag/tiles/s1e1.py | 1 + 1 file changed, 1 insertion(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index ff09753..a046343 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -25,6 +25,7 @@ class Tile: if direction == 's': print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") + input() return True else: if self.bug_leaves_this_time: -- cgit v1.3 From 7635811fbb0e4d942394272f1bfee728fd8ebdeb Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 21:30:49 +0300 Subject: wrong indentation on previous commit --- weatbag/tiles/s1e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index a046343..ad98ad1 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -25,7 +25,7 @@ class Tile: if direction == 's': print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") - input() + input() return True else: if self.bug_leaves_this_time: -- cgit v1.3 From 1c657f1c63776ecbc57b47ebe329cf10ccc8967d Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 23:07:23 +0300 Subject: Added the final bug tile. ToDo: leave restrictions --- weatbag/tiles/s2e1.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 weatbag/tiles/s2e1.py (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py new file mode 100644 index 0000000..1abc1d1 --- /dev/null +++ b/weatbag/tiles/s2e1.py @@ -0,0 +1,21 @@ +from weatbag import words + +class Tile: + def __init__(self): + self.first_time = True + + def describe(self): + print("You have reached upstream." + "You see the bug.") + + def action(self, player, do): + if (do[0] in words.look) and ('bug' in do): + print("Traceback (most recent call last):\n" + " File \"computergame.py\", line 97397, in matrix.py\n" + "IndexError: list index out of range") + input() + if self.first_time == True: + print("Suddenly, you realize!") + self.first_time = False + input() + print("It's not a bug, it's a feature!") -- cgit v1.3 From 7f5815fd7a5366aa2abc3dc97ffe4512fb290b29 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 23:15:02 +0300 Subject: leave restrictions for s2e1 --- weatbag/tiles/s2e1.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 1abc1d1..868d9fc 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -19,3 +19,12 @@ class Tile: self.first_time = False input() print("It's not a bug, it's a feature!") + + def leave(self, player, direction): + restricted_directions = { 'w', 'e' } + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True -- cgit v1.3 From d6160c24f1d610a0dcf8051ece77b9c5b25e86a1 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 23:22:27 +0300 Subject: leave restrictions for s2e1 --- weatbag/tiles/s1e1.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index ad98ad1..f44f4cd 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -22,7 +22,12 @@ class Tile: pass def leave(self, player, direction): - if direction == 's': + restricted_directions = { 'w', 'e' } + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + elif direction == 's': print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") input() -- cgit v1.3 From 325e31b442f3e3cb7f984d26c030b4a6d87ff830 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 23:31:48 +0300 Subject: leave restriction for s1 --- weatbag/tiles/s1.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s1.py b/weatbag/tiles/s1.py index 556a3f3..d1354ec 100644 --- a/weatbag/tiles/s1.py +++ b/weatbag/tiles/s1.py @@ -6,3 +6,17 @@ class Tile: def action(self, player, do): # Nothing to do here yet. print("Sorry, I don't understand") + + def leave(self, player, direction): + restricted_directions = { 'e' } + + # I placed this restriction here to prevent + # early entrance to the bug quest + # which should be started by going South from e1 + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True + -- cgit v1.3 From 4005286d49e8d8f3f6f0f5469104102f6141fa0e Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 23:32:18 +0300 Subject: leave restriction for s2 and indentation style fix --- weatbag/tiles/s2.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s2.py b/weatbag/tiles/s2.py index 474eb55..4e417d0 100644 --- a/weatbag/tiles/s2.py +++ b/weatbag/tiles/s2.py @@ -3,14 +3,27 @@ from weatbag import words class Tile: - def describe(self): - print("To the South, the foliage begins to thin and the path winds " - "forward up a steep hillside. A rugged granite rock formation tops " - "the hill, its centerpiece two slabs of rock leaning together " - "to form a crude arch." ) - - def action(self, player, do): - # Nothing to do here yet. - print("Sorry, I don't understand") + def describe(self): + print("To the South, the foliage begins to thin and the path winds " + "forward up a steep hillside. A rugged granite rock formation tops " + "the hill, its centerpiece two slabs of rock leaning together " + "to form a crude arch." ) + + def action(self, player, do): + # Nothing to do here yet. + print("Sorry, I don't understand") + def leave(self, player, direction): + restricted_directions = { 'e' } + + # I placed this restriction here to prevent + # early entrance to the bug quest + # which should be started by going South from e1 + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True + -- cgit v1.3 From 0f3ea1e46f35c04a6b9f38fa238eb3329268770d Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 00:41:18 +0300 Subject: Added extra commands for interacting with bug. --- weatbag/tiles/s2e1.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 868d9fc..8924842 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -9,7 +9,10 @@ class Tile: "You see the bug.") def action(self, player, do): - if (do[0] in words.look) and ('bug' in do): + if ('bug' in do) and ( do[0] in words.attack or + do[0] in words.look or + do[0] == 'crush' or + do[0] == 'fix' ): print("Traceback (most recent call last):\n" " File \"computergame.py\", line 97397, in matrix.py\n" "IndexError: list index out of range") -- cgit v1.3 From 645d51c6c5702313448520513be97433130725bd Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 05:10:22 +0300 Subject: fixed bug_quest exit message. --- weatbag/tiles/s1e1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index f44f4cd..86b4758 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -4,7 +4,7 @@ import weatbag class Tile: def __init__(self): self.contents = {'bug': 1} - self.bug_leaves_this_time = True + self.first_visit = True pass def describe(self): @@ -31,11 +31,12 @@ class Tile: print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") input() + self.first_visit = False return True else: - if self.bug_leaves_this_time: + if self.first_visit: print("Bugs do not interest you very much.\n" "Lets get out of here.") - self.bug_leaves_this_time = False + self.first_visit = False input() return True -- cgit v1.3 From b6494a43397a58d4861d715c737b299c9e8fe09b Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:18:27 +0300 Subject: Added check for "bugs must be crushed" message. Now the message shows up only the first time the player goes South. --- weatbag/tiles/s1e1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 86b4758..5dabe3c 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -5,6 +5,7 @@ class Tile: def __init__(self): self.contents = {'bug': 1} self.first_visit = True + self.hasnt_gone_south = True pass def describe(self): @@ -27,11 +28,12 @@ class Tile: print("The undergrowth in that direction " "is impassable. You turn back.") return False - elif direction == 's': + elif direction == 's' and hasnt_gone_south: print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") input() self.first_visit = False + self.hasnt_gone_south = False return True else: if self.first_visit: -- cgit v1.3 From 69cba96ca9d026467f3c98a1b8139ae0340e9669 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:24:16 +0300 Subject: added some comments --- weatbag/tiles/s1e1.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 5dabe3c..a29c2d2 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -1,3 +1,4 @@ +# First bug quest tile. from weatbag import words import weatbag @@ -19,9 +20,13 @@ class Tile: else: print("You remember this is where you saw that bug going South.") + # Nothing to do here. def action(self, player, do): pass + # Player can only exit the bug quest going back North. + # Player gets different messages the first time he + # exits this tile, depending on his direction. def leave(self, player, direction): restricted_directions = { 'w', 'e' } if direction in restricted_directions: -- cgit v1.3 From 5774fb83d9139831a5cf1fb0cc6ff3f475d3d9ff Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:26:56 +0300 Subject: Changed They way I check for bug presence. It's simpler and more readable now. --- weatbag/tiles/s1e1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index a29c2d2..854bedd 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -4,7 +4,7 @@ import weatbag class Tile: def __init__(self): - self.contents = {'bug': 1} + self.bug_is_here = True self.first_visit = True self.hasnt_gone_south = True pass @@ -13,10 +13,10 @@ class Tile: print("There is a stream here. " "It runs from South to North.") - if self.contents['bug'] > 0: + if self.bug_is_here: print("You see a huge, ugly bug rush past you, " "following the river South.") - self.contents['bug'] -= 1 + self.bug_is_here = False else: print("You remember this is where you saw that bug going South.") -- cgit v1.3 From 3632fc802ba9c537653e633b12d9430c7ed3f0b6 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:30:54 +0300 Subject: Made a sexist comment more PC. --- weatbag/tiles/s1e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 854bedd..4bb551d 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -26,7 +26,7 @@ class Tile: # Player can only exit the bug quest going back North. # Player gets different messages the first time he - # exits this tile, depending on his direction. + # exits this tile, depending on their direction. def leave(self, player, direction): restricted_directions = { 'w', 'e' } if direction in restricted_directions: -- cgit v1.3 From c569846c6c5253911618924afefb7ae549dd9ef6 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:38:57 +0300 Subject: Added a comment --- weatbag/tiles/s2e1.py | 1 + 1 file changed, 1 insertion(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 8924842..6fd2aec 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -1,3 +1,4 @@ +# Second and final bug quest tile. from weatbag import words class Tile: -- cgit v1.3 From 2e8956d6401daef2793724dfb981e6b41d685457 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:40:57 +0300 Subject: Revert "Made a sexist comment more PC." This reverts commit 3632fc802ba9c537653e633b12d9430c7ed3f0b6. --- weatbag/tiles/s1e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 4bb551d..854bedd 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -26,7 +26,7 @@ class Tile: # Player can only exit the bug quest going back North. # Player gets different messages the first time he - # exits this tile, depending on their direction. + # exits this tile, depending on his direction. def leave(self, player, direction): restricted_directions = { 'w', 'e' } if direction in restricted_directions: -- cgit v1.3 From 2d11dd35211650214ac13a2635d54ac9b615f577 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:42:16 +0300 Subject: Made a sexist comment more PC. --- weatbag/tiles/s1e1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 854bedd..1db29e3 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -25,8 +25,8 @@ class Tile: pass # Player can only exit the bug quest going back North. - # Player gets different messages the first time he - # exits this tile, depending on his direction. + # Player gets different messages the first time they + # exit this tile, depending on their direction. def leave(self, player, direction): restricted_directions = { 'w', 'e' } if direction in restricted_directions: -- cgit v1.3 From 4982768026601a8b1b39cf586e4d37236148e53f Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:56:13 +0300 Subject: Added placeholder files s1e2, s2e2, s3e1 with leave restrictions to prevent early access to the bug quest. --- weatbag/tiles/s1e2.py | 22 ++++++++++++++++++++++ weatbag/tiles/s2e2.py | 22 ++++++++++++++++++++++ weatbag/tiles/s3e1.py | 22 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 weatbag/tiles/s1e2.py create mode 100644 weatbag/tiles/s2e2.py create mode 100644 weatbag/tiles/s3e1.py (limited to 'weatbag') diff --git a/weatbag/tiles/s1e2.py b/weatbag/tiles/s1e2.py new file mode 100644 index 0000000..9ea254f --- /dev/null +++ b/weatbag/tiles/s1e2.py @@ -0,0 +1,22 @@ +class Tile: + + def describe(self): + print("s1e2") + + def action(self, player, do): + pass + + # For future hackers: + # I have placed this restriction here so that + # the player cannot accidentaly enter + # the bug quest early. (which should start by going south from e1) + # Unless the bug quest is appropriately modified, + # please do not remove this restriction from this tile. + def leave(self, player, direction): + restricted_directions = { 'w' } + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True diff --git a/weatbag/tiles/s2e2.py b/weatbag/tiles/s2e2.py new file mode 100644 index 0000000..5665a4e --- /dev/null +++ b/weatbag/tiles/s2e2.py @@ -0,0 +1,22 @@ +class Tile: + + def describe(self): + print("s2e2") + + def action(self, player, do): + pass + + # For future hackers: + # I have placed this restriction here so that + # the player cannot accidentaly enter + # the bug quest early. (which should start by going south from e1) + # Unless the bug quest is appropriately modified, + # please do not remove this restriction from this tile. + def leave(self, player, direction): + restricted_directions = { 'w' } + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True diff --git a/weatbag/tiles/s3e1.py b/weatbag/tiles/s3e1.py new file mode 100644 index 0000000..f5d3682 --- /dev/null +++ b/weatbag/tiles/s3e1.py @@ -0,0 +1,22 @@ +class Tile: + + def describe(self): + print("s1e2") + + def action(self, player, do): + pass + + # For future hackers: + # I have placed this restriction here so that + # the player cannot accidentaly enter + # the bug quest early. (which should start by going south from e1) + # Unless the bug quest is appropriately modified, + # please do not remove this restriction from this tile. + def leave(self, player, direction): + restricted_directions = { 'n' } + if direction in restricted_directions: + print("The undergrowth in that direction " + "is impassable. You turn back.") + return False + else: + return True -- cgit v1.3 From 720badd4dcf23054e44ae9111063c4c2ffa4c329 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 21 Apr 2013 20:59:50 +0300 Subject: nothing important --- weatbag/tiles/s3e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s3e1.py b/weatbag/tiles/s3e1.py index f5d3682..2ce9adf 100644 --- a/weatbag/tiles/s3e1.py +++ b/weatbag/tiles/s3e1.py @@ -1,7 +1,7 @@ class Tile: def describe(self): - print("s1e2") + print("s3e1") def action(self, player, do): pass -- cgit v1.3 From 107257df0d103c879d1b7d39bbee9789051545e4 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Mon, 22 Apr 2013 07:28:01 +0300 Subject: forgot to write 'self.' before a variable --- weatbag/tiles/s1e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 1db29e3..3e11d37 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -33,7 +33,7 @@ class Tile: print("The undergrowth in that direction " "is impassable. You turn back.") return False - elif direction == 's' and hasnt_gone_south: + elif direction == 's' and self.hasnt_gone_south: print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") input() -- cgit v1.3 From 4af6ad330528179fe53b897c880116037b8a51bd Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Mon, 22 Apr 2013 08:14:41 +0300 Subject: Had forgotten to include a restricted direction for the final bug quest tile. --- weatbag/tiles/s2e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 6fd2aec..0bd506d 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -25,7 +25,7 @@ class Tile: print("It's not a bug, it's a feature!") def leave(self, player, direction): - restricted_directions = { 'w', 'e' } + restricted_directions = { 'w', 'e', 's' } if direction in restricted_directions: print("The undergrowth in that direction " "is impassable. You turn back.") -- cgit v1.3 From f2a794bd17cf21a15a43e8fd76a0fde5e000f23b Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Wed, 24 Apr 2013 17:06:30 +0300 Subject: deleted placeholder files --- weatbag/tiles/s1e2.py | 22 ---------------------- weatbag/tiles/s2e2.py | 22 ---------------------- weatbag/tiles/s3e1.py | 22 ---------------------- 3 files changed, 66 deletions(-) delete mode 100644 weatbag/tiles/s1e2.py delete mode 100644 weatbag/tiles/s2e2.py delete mode 100644 weatbag/tiles/s3e1.py (limited to 'weatbag') diff --git a/weatbag/tiles/s1e2.py b/weatbag/tiles/s1e2.py deleted file mode 100644 index 9ea254f..0000000 --- a/weatbag/tiles/s1e2.py +++ /dev/null @@ -1,22 +0,0 @@ -class Tile: - - def describe(self): - print("s1e2") - - def action(self, player, do): - pass - - # For future hackers: - # I have placed this restriction here so that - # the player cannot accidentaly enter - # the bug quest early. (which should start by going south from e1) - # Unless the bug quest is appropriately modified, - # please do not remove this restriction from this tile. - def leave(self, player, direction): - restricted_directions = { 'w' } - if direction in restricted_directions: - print("The undergrowth in that direction " - "is impassable. You turn back.") - return False - else: - return True diff --git a/weatbag/tiles/s2e2.py b/weatbag/tiles/s2e2.py deleted file mode 100644 index 5665a4e..0000000 --- a/weatbag/tiles/s2e2.py +++ /dev/null @@ -1,22 +0,0 @@ -class Tile: - - def describe(self): - print("s2e2") - - def action(self, player, do): - pass - - # For future hackers: - # I have placed this restriction here so that - # the player cannot accidentaly enter - # the bug quest early. (which should start by going south from e1) - # Unless the bug quest is appropriately modified, - # please do not remove this restriction from this tile. - def leave(self, player, direction): - restricted_directions = { 'w' } - if direction in restricted_directions: - print("The undergrowth in that direction " - "is impassable. You turn back.") - return False - else: - return True diff --git a/weatbag/tiles/s3e1.py b/weatbag/tiles/s3e1.py deleted file mode 100644 index 2ce9adf..0000000 --- a/weatbag/tiles/s3e1.py +++ /dev/null @@ -1,22 +0,0 @@ -class Tile: - - def describe(self): - print("s3e1") - - def action(self, player, do): - pass - - # For future hackers: - # I have placed this restriction here so that - # the player cannot accidentaly enter - # the bug quest early. (which should start by going south from e1) - # Unless the bug quest is appropriately modified, - # please do not remove this restriction from this tile. - def leave(self, player, direction): - restricted_directions = { 'n' } - if direction in restricted_directions: - print("The undergrowth in that direction " - "is impassable. You turn back.") - return False - else: - return True -- cgit v1.3 From 024db80b3f04d12cae92c669d450da2e15072bfb Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Wed, 24 Apr 2013 17:07:42 +0300 Subject: made output string end on 3 periods This is done because this is the first string after which the player is expected to press enter to continue. Hopefully, 3 periods are an effective hint and avoid the clutter of "press enter to continue..." messages. --- weatbag/tiles/e1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/e1.py b/weatbag/tiles/e1.py index 5a0cded..8e69a9a 100644 --- a/weatbag/tiles/e1.py +++ b/weatbag/tiles/e1.py @@ -27,7 +27,7 @@ class Tile: def leave(self,player,direction): if direction == 's': print("You decide the path is too boring for you,\n" - "so you follow the stream south, looking for adventure!") + "so you follow the stream south, looking for adventure...") input() return True else: -- cgit v1.3 From fe1ea2ed93eaec1219784e7142f382157bf90f19 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Wed, 24 Apr 2013 17:21:49 +0300 Subject: added comment about entry restrictions on bugquest tiles --- weatbag/tiles/s1e1.py | 5 +++++ weatbag/tiles/s2e1.py | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'weatbag') diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 3e11d37..8a217e0 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -1,4 +1,9 @@ # First bug quest tile. +# +# To future hackers: +# This is part of a short quest which beggins by +# going South from e1. Plase consider this when coding neighbouring tiles. +# thnx :) from weatbag import words import weatbag diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 0bd506d..42c3b72 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -1,4 +1,9 @@ # Second and final bug quest tile. +# +# To future hackers: +# This is part of a short quest which beggins by +# going South from e1. Plase consider this when coding neighbouring tiles. +# thnx :) from weatbag import words class Tile: -- cgit v1.3 From 871d2649c85c56c6b092cffa91a42e2a3210706d Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Wed, 24 Apr 2013 18:44:20 +0300 Subject: editted fake error on bug quest --- weatbag/tiles/s2e1.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'weatbag') diff --git a/weatbag/tiles/s2e1.py b/weatbag/tiles/s2e1.py index 42c3b72..f09581f 100644 --- a/weatbag/tiles/s2e1.py +++ b/weatbag/tiles/s2e1.py @@ -20,7 +20,10 @@ class Tile: do[0] == 'crush' or do[0] == 'fix' ): print("Traceback (most recent call last):\n" - " File \"computergame.py\", line 97397, in matrix.py\n" + " File \"matrix.py\", line 97397, in \n" + " main()\n" + " File \"slacking_off.py\", line 23934, in main\n" + " print(excuse[723])\n" "IndexError: list index out of range") input() if self.first_time == True: -- cgit v1.3