summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-01-14 08:37:00 -0800
committerThomas Kluyver <takowl@gmail.com>2013-01-14 08:37:00 -0800
commitf19f86792b33beaf2e1e12989a85557ae7fbc29c (patch)
treeb2f50d4358cb187eafb06f7926491b6e6884f6a0
parent57cccc9d6a0af98b86024a6d6d054997c8ba509f (diff)
parentb95c7a7278ed87863ffc9086ed0eebb6c6227e72 (diff)
Merge pull request #13 from SmartViking/master
Changed action.get_action
-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'}