Skip to content

A Java Implementation of Egyptian Rat Screw and Slapjack. Created by Sammy M., Tom DV., and Soham M.

Notifications You must be signed in to change notification settings

Zakenmaru/ERS-Slapjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

ERS-Slapjack

A Java Implementation of Egyptian Rat Screw and Slapjack. Created by Sammy M., Tom DV., and Soham M.

Main Method is in the ers.slapjack.PlayingField Class.

ERS

The ERS project is a Java implementation of the popular card games Egyptian Rat Screw and Slapjack(as an extra). The goal of the game is to get all cards before the other players, and in the event that a player gets all the cards, they become the winner.

Decks Explained

There are three types of decks: the Master ers.slapjack.Deck, a Player's ers.slapjack.Deck, and a Burn ers.slapjack.Deck. The Master ers.slapjack.Deck is where gameplay takes place and where cards are played onto from the Player's ers.slapjack.Deck. In the event that a player makes an illegal move when it is not their turn, that card gets discarded to the Burn ers.slapjack.Deck, a deck separate from the Master ers.slapjack.Deck.

Choosing Multiple Decks

Since the game supports up to 10 players, in the event that a player has too few cards extra ers.slapjack.Card Decks can be added to make a more fair and engaging game.

How to play

In order to win, a player has two functions: to deal or to slap. Usually a player will deal cards to the Master ers.slapjack.Deck whenever it is his or her turn. Depending on the last card played a player may deal more than one card. They slap when a certain condition is met. Should they make an illegal slap, one of their cards will get discarded to the burn pile. If they slap correctly then they get all the cards from both the Master ers.slapjack.Deck and the Burn ers.slapjack.Deck and the player plays again and the game progresses as normal. The game ends when one player is able to slap the pile and get all the cards in the game.

For instance, a game is being played with 3 players and two players have run out of cards. The one player remaining has to keep playing cards until the deck is slappable and they win it from the other person. Those players without cards, however, may slap in if they've played on the pile during the current set of the Master ers.slapjack.Deck.

Classic Rules(Select set of rules at the beginning of the game)

SANDWICH RULE APPLIES TO ALL*

Doubles: If two consecutive cards played are the same number or face(EX: 5 of Hearts and 5 of Spades are played one after another) Adding up to 10: If the sum of two consecutive cards adds up to 10 (EX: 3 played after a 10) Marriage: If a Queen and King are played one after another

*Sandwich Rule: When the same condition happens, but there's a card of different value in between them, it can still be slapped (EX: for doubles, if there's 9-7-9 then it can be slapped although 9-7-6-9 cannot be slapped because there are two cards instead of one between them. For adding up to 10, if it's 5-7-5 it can be slapped or 9-8-1. For a King and Queen, it can be K-A-Q or Q-9-K)

Special Cards(Classic Rules Only)

Aces: The next player has to deal 4 cards. Unless a face card/10 is dealt OR a slappable condition is met and the deck gets slapped, the person who dealt the Ace gets all the cards in the Master ers.slapjack.Deck and gameplay resumes. Kings: The next player has to deal 3 cards. Unless a face card/10 is dealt OR a slappable condition is met and the deck gets slapped, the person who dealt the King gets all the cards in the Master ers.slapjack.Deck and gameplay resumes. Queens: The next player has to deal 2 cards. Unless a face card/10 is dealt OR a slappable condition is met and the deck gets slapped, the person who dealt the Queen gets all the cards in the Master ers.slapjack.Deck and gameplay resumes. Jacks: The most valuable card in the game, the next player has to deal 1 card. Unless a face card/10 is dealt OR a slappable condition is met and the deck gets slapped, the person who dealt the Jack gets all the cards in the Master ers.slapjack.Deck and gameplay resumes. 10: Will stop any Face ers.slapjack.Card that gets played. Gameplay resumes as normal and if a 10 is played even when there's no face in the deck it's treated as a normal card.

Note that all special cards can be slapped if they meet the Doubles Rule. Adding up to 10 works for the Ace as Ace = 1, so an Ace and 9 played consecutively is slappable. However, 10 in itself is NOT slappable.

Slapjack Rules(Select set of rules at the beginning of the game)

A Slappable Game as well, except Special Cards don't exist save for Jack. Game ends when one player has all 52 cards, and the only card that can be slapped is a Jack. Whoever slaps correctly gets the deck; whoever slaps incorrectly has to burn their top card.

About

A Java Implementation of Egyptian Rat Screw and Slapjack. Created by Sammy M., Tom DV., and Soham M.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages