alexmerren / card-game

A card game application for ECM2414.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card Game

This is a card game application created for the ECM2414 pair programming assignment. This assignment recieved an 87/100.

Contents

Compilation

Production

In order to compile the game from the source code:

$ cd src
$ javac {Card.java,CardDeck.java,MainDeck.java,Player.java,CardGame.java} -d ../out

This will put all the bytecode files in the out directory.

Tests

In order to compile the tests from the source code:

$ cd src
$ javac -cp ".:../lib/*" {CardTest.java,CardDeckTest.java,MainDeckTest.java,PlayerTest.java,CardGameTest.java} -d ../out

If compiling in Windows Command Line, replace the : with ;.

Functionality

Production

In order to run the game:

$ cd out
$ java CardGame

For running the game, I have included a test pack called 10.txt.

When prompted, type in 10 for the amount of players, and ../data/10.txt as the pack of cards.

Tests

In order to run the tests:

$ cd out
$ java -cp ".:../lib/*" org.junit.runner.JUnitCore TestSuite

Similarly with the production code, to run in windows, replace : with ;.

Output

After running the game, the game will create a directory called output.

The output directory will contain all the moves made by all players, and the contents of all of the decks throughout the game.

About

A card game application for ECM2414.

License:MIT License


Languages

Language:Java 100.0%