if equal

draw
if any of the lose condition

lose
else

win