can i use this as a user defined function? or is there something wrong with it my debugged errors on it for some reason
(all int variables and defined in code)
int battle()
{
if (pick == 1 && cpu == 2)
return home++;
else if (pick == 1 && cpu == 3)
return comp++;
else if (pick == 2 && cpu == 1)
return comp++;
else if (pick == 2 && cpu == 3)
return home++;
else if (pick == 3 && cpu == 1)
return home++;
else if (pick == 3 && cpu == 2)
return comp++;
else if (pick = cpu)
return tie++;
}