Wednesday, May 23, 2018

Jogo da Velha em python

import sys #Variaveis Globais# matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] jogadores = -1 flag = 1 def verifica_potuacao(arena,jog): for i in range(3): soma = 0 for j in range(3): soma = soma + arena[i][j] if (soma == 3): print("Jogador 1 ganhou") sys.exit() if (soma == -3): print("Jogador 2 ganhou") ...
Share: