You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.
bool Bispo::checaMovimento(int xAtual, int yAtual, int xDestino, int yDestino)
{
int x, y;
x = xAtual - xDestino;
y = yAtual - yDestino;
bool flag = false;
if (x == y || x == y * -1) // verifica se o movimento eh valido ao comparar a movimentacao em colunas e linhas para ver que a movimentacao foi feita diagonalmente
flag = true;
if(xAtual == xDestino) // verifica se o movimento eh invalido ao comparar que o destino eh igual a posicao atual