/switch

Primary LanguageRubyMIT LicenseMIT

Switch

Switch is a card game for 2 or more players, similar to Uno, but played with a regular deck of playing cards. Players take it in turns to play a single card that matches the previously played card in either suit or rank; if the player has not suitable card in their hand, they must pick up a new card from the stock. The aim is to get rid of your cards before any other player.

Rules

  • For between 2 to 5 players, a single deck of cards is used. For more than 5 players, two decks are used.
  • Each player is dealt 7 cards, and the top card of the remaining stock is placed face-up on the table.
  • Players take it in turns to play a single card that matches the current face-up card in either suit or rank. If the player cannot play, they must pick up one card from the stcok to add to their hand, and play moves on to the next player.
  • The winner is the first player to play all their cards.

Power Cards

In general, play continues based on the rules set out above. Some cards have a special meaning:

  • 2: if a two of any suit is played, the next player must pick up two cards. If the next player can play a two, then the following player must pick up four cards, unless they themselves can play a two, in which case the following player must pick up six, and so on. The player picking up cards cannot forfeits their regular turn.
  • 8: the next player misses their turn.
  • King: play reverses direction.
  • Ace: is a wild card, and can be played regardless of the suit and colour of the face-up card. The player who plays the ace gets to choose which suit has to be played by the next person.

License

This software is released under the MIT license as detailed in the LICENSE file that should be distributed with this library.