From the Super Mario Wiki
The game's purpose is to make sheep jump over a fence. To do so, the player has to use . If done so, the game is won. However, if one sheep runs into the fence, the player loses.
A extended version of this microgame named Staying Asheep also appears in the game.