vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
I like vegaseats Idea for the list usage, but maybe it could be altered alittle bit, say
my_str = weapon # fists default!
my_life = 10
weapon = fists
fists = 1
dagger = 2
short_sword = 3
broad_sword = 5
def battle():
mruane
Junior Poster in Training
76 posts since Oct 2006
Reputation Points: 10
Solved Threads: 1
Let's assume that you're implementing the queue with a simple list.
In the specific case of a limit break, it would be easy to implement without a double queue:
if action == limit_break:
action_queue = [character] + action_queue
else:
action_queue.append(character)
That is, if the character casts the limit break, he jumps to the front of the line.
Jeff
jrcagle
Practically a Master Poster
608 posts since Jul 2006
Reputation Points: 92
Solved Threads: 156