C Plus Poker (C++ Poker)
Introduction
This is a C++ console application that simulates the scoring of a Poker game. Unlike typical Poker, this application allows for any number of players and numbers of cards other than 5. It was developed in Visual Studio Code with the C/C++ extension for VS Code. I used MSYS2 for Windows to provide Mingw-w64, which provides things like g++ and gdb for building and debugging. This repository also contains my .vscode folder, which contains my build and debugging instructions. My path for Mingw-w64 is located at "C:\msys64\mingw64\bin", but this can be changed.
For detailed instructions on how to copy my development setting, you can refer to VS Code's documentation on using GCC with MinGW.
Deliverables
UPDATE: This section has been edited to reflect the new state of the repository. poker.exe and "testing\handsmaker.exe" have been removed from the repository, and v1.0.0 has been put out as a release build. You can find it under releases. It must be run from the command line like so:
.\CPlusPoker.exe [-optional flags]
Testing
To very quickly test large amounts of sample data, I wrote a seperate program "testing\handsmaker.cpp", which generates hands and creates a random "hands.txt" file. These files can then be used for testing with the main program to observe and note any inconsistencies.
Running
As mentioned earlier, the program can be run with optional flags. The usage is as follows:
Flag | Params | Effect |
---|---|---|
-h | Displays usage information and any optional flags. | |
-d | [dir] | Used to specify the path to file "hands.txt". Otherwise, uses default file in root directory. |
-p | Prints out full output of game, including each player's hand and hand ranking. | |
-t | Prints out ties in winners list. |
Here are some examples:
.\CPlusPoker.exe -p -d testing\hands.txt
This runs the program with game print out, no ties shown, and specifies the test file generated by "testing\handsmaker.exe" as the target file.
.\CPlusPoker.exe -t
This runs the program with only the winners list, ties shown, and uses the default file.
.\CPlusPoker.exe -h
This shows the usage in the console and terminates.
Conclusion
This concludes the overview of C Plus Poker.
Start time: Tuesday, October 19, 2021, 6:46:56 PM EST
Stop time: Wednesday, October 20, 2021, 6:34:05 PM EST