From b95c7a7278ed87863ffc9086ed0eebb6c6227e72 Mon Sep 17 00:00:00 2001 From: Smart Viking Date: Mon, 14 Jan 2013 17:24:17 +0100 Subject: Changed action.get_action to handle prepositions differently --- weatbag/action.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'weatbag/action.py') 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'} -- cgit v1.3