Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Xas ( 17 years ago )
int dx_TORRE[4] = { -1, 0, 1, 0 };
int dy_TORRE[4] = { 0, 1, 0, -1 };
int dx_ALFIL[4] = { -1, -1, 1, 1 };
int dy_ALFIL[4] = { 1, -1, 1, -1 };
int dx_CAVALL[8] = { -1, -1, 1, 1, -2,-2,2,2 };
int dy_CAVALL[8] = { 2, -2, 2, -2, 1, -1, 1, -1};
struct jugada {
int x, y,xx,yy;
bool kill;
int val; //com valorem una jugada
};
int rival(char a, char b) {
if (isupper(b)) swap(a,b);
return ((a>='A' and a<='Z') and (b>='a' and b<='z'));
}
Revise this Paste