Skip to main content
added 6 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 5050 48 bytes

lambda a,b:(60>a+b>b-1<a>b61<~a<a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen


Left part (b-61<~a<a>b/22*b-3) is a validity-check, and right part (19<b-(b<30)>a) is a check for game ended.

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 50 bytes

lambda a,b:(60>a+b>-1<a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 50 48 bytes

lambda a,b:(b-61<~a<a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen


Left part (b-61<~a<a>b/22*b-3) is a validity-check, and right part (19<b-(b<30)>a) is a check for game ended.

added 7 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63

Python 2, 97 95 75 72 71 70 69 64 55 54 52 5151 50 bytes

lambda a,b:(a>60>a+b>-1<b<=30>a>b1<a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 bytes

lambda a,b:(a>-1<b<=30>a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 50 bytes

lambda a,b:(60>a+b>-1<a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

added 6 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63

Python 2, 97 95 75 72 71 70 69 64 55 5454 52 51 bytes

lambda a,b:(a>-1<b<31>a+1>(b>21)*b1<b<=30>a>b/22*b-23)*~(19<b-(b<30)>a)

Try it online!Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

Python 2, 97 95 75 72 71 70 69 64 55 54 bytes

lambda a,b:(a>-1<b<31>a+1>(b>21)*b-2)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

Python 2, 97 95 75 72 71 70 69 64 55 54 52 51 bytes

lambda a,b:(a>-1<b<=30>a>b/22*b-3)*~(19<b-(b<30)>a)

Try it online!

Takes input as pre-ordered a,b.

Returns -2, -1, 0 for ended, in play, invalid.

-1 byte, thanks to Kevin Cruijssen

deleted 2 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
deleted 2 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
added 8 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
added 65 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
added 9 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
deleted 16 characters in body
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading
Source Link
TFeld
  • 19.9k
  • 3
  • 20
  • 63
Loading