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 LUGBURZ ( 17 years ago )
enum outcome {xs,os,unfinished};
outcome GetOutcome()
{
int wins[8][3]={ {0,1,2}, {3,4,5}, {6,7,8}, {0,3,6}, {1,4,7}, {2,5,8}, {0,4,8}, {2,4,6} };
for(int i=0;i<8;i++)
if(GameField[wins[i][0]]==GameField[wins[i][1]] && GameField[wins[i][0]]==GameField[wins[i][2]] && GameField[wins[i][0]]!=' ')
return GameField[wins[i][0]]=='x' ? xs : os;
return unfinished;
};
Revise this Paste