A SDL 2.0 based game of Hearts I created during college.
Note: This project was originally created using Eclipse CDT for Linux, and started by following a simple SDL tutorial by Will Usher
Special credit to kenney.nl for the card images: https://www.kenney.nl/assets/boardgame-pack
Most Linux systems should support command-line installation. Simply follow the instructions listed here: https://wiki.libsdl.org/Installation#Linux.2FUnix
- Navigate to the source directory
- Run the following:
> make > ./sdl2-hearts-game.out
Windows with Cygwin
- gcc-g++
- libSDL2-devel
- libSDL2_image-devel
- libSDL2_ttf-devel
- debus-x11
- openssh
- xinit
- xorg-server
- Open a Cygwin terminal and run
startxwin
- Open a second Cygwin terminal
- Navigate to the source directory
- Run the following:
> export DISPLAY=:0 > make > ./sdl2-hearts-game.exe
- The full deck (52 cards) is dealt randomly between four players (13 each)
- Just to spice it up, at the very beginning everyone picks three cards to swap with others
- The person with the two of clubs starts off the first round
- You must match the starting suit (per round)
- If you don't have one of that suit, you can play anything
- Hearts
- These cards are a "last resort"
- If no one has played a heart yet, you can't play one
- You can only play a heart if it's the last suit you have
- If someone has already played a heart (anytime during the game, per deal) hearts are "broken"
- If hearts are "broken" they become a normal suit that can be played just like any others
- At the end of a round (each person has layed down a card) the winner is the one with the highest value in the starting suit
- For each heart you win you gain a point
- The queen of spades counts as 13 points
- The scoring is like golf, lowest score wins at the end