summaryrefslogtreecommitdiffstats
path: root/weatbag/action.py
diff options
context:
space:
mode:
authorSmart Viking <smartviking@smartviking.(none)>2013-01-14 17:24:17 +0100
committerSmart Viking <smartviking@smartviking.(none)>2013-01-14 17:24:17 +0100
commitb95c7a7278ed87863ffc9086ed0eebb6c6227e72 (patch)
treeb2f50d4358cb187eafb06f7926491b6e6884f6a0 /weatbag/action.py
parent57cccc9d6a0af98b86024a6d6d054997c8ba509f (diff)
Changed action.get_action to handle prepositions differently
Diffstat (limited to 'weatbag/action.py')
-rw-r--r--weatbag/action.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/weatbag/action.py b/weatbag/action.py
index c2274ac..73e5a47 100644
--- a/weatbag/action.py
+++ b/weatbag/action.py
@@ -4,16 +4,14 @@ from weatbag.items import combine
def get_action():
"""Prompts for an action, splits it into words, and removes any prepositions.
-
+
movement actions will be represented by the move token object in this module,
followed by a one-letter direction.
"""
action = []
while len(action) == 0:
action = input('> ').lower().split()
- for prep in words.prepositions.intersection(action):
- action.remove(prep)
-
+ action = [w for w in action if w not in words.prepositions]
return action
move_directions = {'n','e','s','w','north','east','south','west'}