Skip to content

4 Player threads and a dealer thread. Order is enforced via mutex and the players draw 1 card and compare to their partners. If it's a match, the round ends.

Notifications You must be signed in to change notification settings

lukabrown/same-card-multithreaded-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thread-synchronous-game

Game by Luka Brown

The program will create two outputs. One output.txt which records every single game action, and then a terminal output that just displays the final hands and who won each round. The actual output does not display which suit it is, but the terminal output does.

Instructions:

WINDOWS: compile using the command similar to 'g++ game.cpp -o game' LINUX: compile using the command similar to 'g++ game.cpp -o game -lpthread'

Run with only 1 integer parameter: the starting seed value

About

4 Player threads and a dealer thread. Order is enforced via mutex and the players draw 1 card and compare to their partners. If it's a match, the round ends.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages