Skip to main content
3 of 10
added 9 characters in body
TFeld
  • 19.9k
  • 3
  • 20
  • 63

Python 2, 97 95 75 72 bytes

lambda a,b:(-1<a<=b<22or 0<a>=b-2<b<31>a+1)and(20<b-(b<30)>a)+(a<20<b)+1

Try it online!

Takes input as pre-ordered a,b.

Returns 2, 1, False for ended, in play, invalid.

TFeld
  • 19.9k
  • 3
  • 20
  • 63