I have updated it to protect against the wrong number being entered and changed the two player turn methods into takeTurn. I haven't done anything about the victory method yet.
#Create Empty Board
matrice = [[ '-' for i in range(3) ] for j in range(3)]
#Print Matrice
def printMatrix():
print "\n\n"
for i in range(3):
print " | ",
for j in range(3):
print matrice[i][j],
print " | ",
print "\n",
print"\n\n"
#Take player one's turn
def takeTurn(c):
printMatrix()
print "Player " ,c
x = int(input("Enter X co-ordinate: "))
y = int(input("Enter Y co-ordinate: "))
if y > 3 or y < 1 or x > 3 or x < 1:
print "Please choose another square\n\n"
takeTurn(c)
x -= 1
y -= 1
if matrice[y][x] == '-':
matrice[y][x] = c
else:
print "Please choose another square\n\n"
takeTurn(c)
#Test if Game Has Come to End
def gameStatus():
over = '='
for i in range(3):
for j in range(3):
if matrice[i][j] == '-':
over = '-'
break
for i in range(3):
if matrice[0][i] == matrice[1][i] == matrice[2][i]:
victory(matrice[1][i])
if matrice[i][0] == matrice[i][1] == matrice[i][2]:
victory(matrice[i][1])
if matrice[0][0] == matrice[1][1] == matrice[2][2]:
victory(matrice[1][1])
if matrice[2][0] == matrice[1][1] == matrice[0][2]:
victory(matrice[1][1])
if over == '=':
victory(over)
#Victory Print
def victory(c):
if c == 'X':
print "\t _______"
print "\t/ \\"
print "\t|VICTORY|"
print "\t| FOR |"
print "\t|PLAYER |"
print "\t| ONE |"
print "\t\\_______/"
printMatrix()
raise SystemExit
if c == 'Y':
print "\t _______"
print "\t/ \\"
print "\t|VICTORY|"
print "\t| FOR |"
print "\t|PLAYER |"
print "\t| TWO |"
print "\t\\_______/"
printMatrix()
raise SystemExit
if c == '=':
print "\t _______"
print "\t/ \\"
print "\t| DRAW |"
print "\t\\_______/"
printMatrix()
raise SystemExit
#main logic
def main():
while True:
takeTurn('X')
gameStatus()
takeTurn('O')
gameStatus()
#Set to run main
if __name__ == "__main__":
main()
Thank you very much for the feedback.