It just runs function pl_shooting() once(asks input from player) and then loops between two "elif"s infinitely ignoring functions pl_shooting() and pc_shooting() for some reason. So eventually computer just juggles variable turn and switches it's value between 'pc' and 'pl'. What's going on? O_o
Actually it should run pl_shooting or pc_shooting and switching between them every turn. But pc_shooting doesn't run for some reason at all and pl_shooting runs only once.
while pl_life() and pc_life(): if turn == '0': if dice == 0: pl_shooting() turn = 'pc' else: pc_shooting() turn = 'pl' elif turn == 'pl': pl_shooting turn = 'pc' elif turn == 'pc': pc_shooting turn = 'pl' else: print 'Error'