Rack-O Example 3

example game

$ python3 racko.py
Welcome to Solitaire Rack-O!

Here is your rack:
SLOT CARD
  10   37
   9   11
   8   35
   7   17
   6   14
   5   32
   4   24
   3   31
   2   28
   1   12

The face-up card is 13.
(D)raw, take the (F)aceup card, or (Q)uit? n
Invalid choice. Try again.
(D)raw, take the (F)aceup card, or (Q)uit? abc
Invalid choice. Try again.
(D)raw, take the (F)aceup card, or (Q)uit? draw
Invalid choice. Try again.
(D)raw, take the (F)aceup card, or (Q)uit? d
You drew a 40
Choose a slot to exchange or select 0 to discard.
Which slot do you want to put it in? 10

Here is your rack:
SLOT CARD
  10   40
   9   11
   8   35
   7   17
   6   14
   5   32
   4   24
   3   31
   2   28
   1   12

The face-up card is 18.
(D)raw, take the (F)aceup card, or (Q)uit? d
You drew a 13
Choose a slot to exchange or select 0 to discard.
Which slot do you want to put it in? 15
Invalid slot. Try again.
Choose a slot to exchange or select 0 to discard.
Which slot do you want to put it in? -123
Invalid slot. Try again.
Choose a slot to exchange or select 0 to discard.
Which slot do you want to put it in? 0

Here is your rack:
SLOT CARD
  10   40
   9   11
   8   35
   7   17
   6   14
   5   32
   4   24
   3   31
   2   28
   1   12

The face-up card is 38.
(D)raw, take the (F)aceup card, or (Q)uit? f
Choose a slot to exchange.
Which slot do you want to put it in? 9

Here is your rack:
SLOT CARD
  10   40
   9   38
   8   35
   7   17
   6   14
   5   32
   4   24
   3   31
   2   28
   1   12

The face-up card is 2.
(D)raw, take the (F)aceup card, or (Q)uit? q

You gave up after 4 turns.