PokerGame Implementation
Classes Overview
Card.java
- link -> All the card properties such as suit, values and the ranking functionalities for the hands are implemented here.PokerMain.java
- link -> Main Class testing the winner of 2 hands.CardTest.java
- link -> All the tests using the JUnit tool is tested in this file. Unfortunately the folder is insidesrc
as I couldn't change the package structure after development.
Implemented Functionalities
This Poker game tests 2 functionalities
- A pair of card between 2 hands defined by
isAPair()
inCard.java
- Two pair of cards between 2 hands defined by
isTwoPair()
inCard.java
- A function to test 2 pair of hands is defined by
testisAPair()
inPokerMain.java
Execution
- The main program can be accessed and run from
/src/game/PokerGame.java
- A simple test to compare a pair of card is implemented here.
- The result "Hand X is won", based on the card values is printed to the console.