Background
In the solitaire game Shephy, you start with one sheep in your field, and you must manage the event cards presented to you in order to have one thousand sheep in the field before you go through the deck of event cards three times.
The sheep deck consists of values 1, 3, 10, 30, 100, 300 and 1,000; at the start of the game, you place a 1 sheep card in your field, then shuffle the 22 event cards and lay out five cards to form your hand. On a turn, you choose one card, carry out its effect, then refill your hand to five cards. Event cards might duplicate existing sheep cards, add new ones, swap one value of sheep for another, remove sheep, etc. Play through the deck until you have no cards in hand, then shuffle the event cards.
If you go through the deck three times without having at least one 1,000 sheep card in the field or if at any point in the game you have no sheep in the field, then you lose.