My question is how do i call the variable Neotile from the main function into the Neo() function and then redefine it and return it back into the main function at the begging of the while loop so it is redefined?
from p2lib import *
from string import *
def main():
humantile = 0
Neotile = 0
print "Welcome to the teleportation game"
humanplayer = raw_input("Please enter a user name: ")
print "Ok let's play", humanplayer
while (human != 51) or (Neo != 51):
rolls = rollDice(2, 6)
print "You rolled a", rolls
humanmove = input("Which die do you want to use on yourself? ")
if humanmove == rolls[0]:
humantile = humantile + humanmove
opposite = lower(raw_input("Enter the name of the player you wish to move: "))
if (opposite == "neo"):
Neotile = Neotile + rolls[1]
elif humanmove == rolls[1]:
humantile = humantile + humanmove
opposite = lower(raw_input("Enter the name of the player you wish to move: "))
if (opposite == "neo"):
Neotile = Neotile + rolls[0]
##-----------------------------------------------------------------------------
print "Neo's turn"
print
def Neo():
rolls = rollDice(2, 6)
if rolls[0] > rolls[1]:
Neomove = rolls[0]
Neotile =