diff options
| author | Smart Viking <smartviking@smartviking.(none)> | 2013-01-14 17:24:17 +0100 |
|---|---|---|
| committer | Smart Viking <smartviking@smartviking.(none)> | 2013-01-14 17:24:17 +0100 |
| commit | b95c7a7278ed87863ffc9086ed0eebb6c6227e72 (patch) | |
| tree | b2f50d4358cb187eafb06f7926491b6e6884f6a0 /weatbag/action.py | |
| parent | 57cccc9d6a0af98b86024a6d6d054997c8ba509f (diff) | |
Changed action.get_action to handle prepositions differently
Diffstat (limited to 'weatbag/action.py')
| -rw-r--r-- | weatbag/action.py | 6 |
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'} |
