GavinStirling / card-game

0 stars 0 forks source link

Card Game Challenge

This is my version of a snap game. It is a command line based game made using java.

The focus of the project was to use the following principles:

The project was broken up into stages and the project is completed up to Stage 4A.

Stage 1

Using classes, ArrayLists and methods, create a deck of Cards. You should use the following classes:

CardGame

Card

Stage 2

Add methods for the CardGame class that allow for the following:

Stage 3

Create class for Snap that extends CardGame. This class should use the methods defined above, as well as some new ones, to enable the user to play the game snap according to the following rules: By pressing enter in the command line, the user takes their turn. Each turn, a new card is dealt from the deck. The game continues until two cards in a row have the same symbol, at which point the “player” wins and the game ends.

Stage 4A

Create a Player class and enable the snap game to be two player, with the users taking it in turns to go. If the snap occurs on the users turn, they win.

Stage 4B

Add a timer so that when there is a snap opportunity, the player has 2 seconds to submit the word “snap” in order to win. If they don’t type it in time, they lose.