Skip to content

oasjs/hearts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

169 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copas

Complete UML diagramation and implementation of the card game Copas (Hearts), for the Software Engineering subject in the Computer Science course at Federal University of Santa Catarina.

Installation

To play Copas, you will need Python 3.10 (or newer). The following instructions follow bash format, but you can install Copas similarly on Windows.

After cloning the repository, navigate into the root folder and initialize a virtual environment using venv.

$ cd ine5417
$ mkdir venv
$ python3 -m venv venv/

Activate the virtual environment. If the activation goes right, you'll see a prefix (venv) at the start of your terminal line.

$ source venv/bin/activate

Then install the program requirements.

(venv) $ pip install -r requirements.txt

Finally, run the game.

(venv) $ python3 src/main.py

Custom font

For the best experience with Copas, make sure you have the Jersey 25 font installed in your machine.

How to play

Copas is an online multiplayer game that requires four players.

When you start the game, you will see the title screen, where you can insert your in-game name.

Copas title screen

After pressing play, you'll be moved to a waiting room, where you (or any other player in the waiting room) can try to start the game. If there are 3 other players already in the waiting room, a match will start.

Waiting room

After the match starts, you'll see your cards at the bottom region of the screen. Each opponent will be on their side of the screen, identified by the name they selected at the start.

Match view

If it's your turn to play, you'll be able to select the one of the enabled cards in your hand and play it.

At the end of a round, if at least one of the players has reached 100 points, the match ends and the winner is the player with the lowest score.

Rule changes

Some minor rules of the original game were altered or removed from this version:

  • The exchange round was removed.
  • The game only allows 4 players. No more, no less.
  • The rule that forbid playing a valued card (heart-suited card or the queen of spades) on your first turn of the round was removed.

Dev notes

The game interface was implemented using CustomTkinter and Pillow, which helped making the game look much better.

The game assets were made by SpicyGame.

Remote connection was implemented using DOG (Doing Online Games), a library developed by our professor to allow online turn-based games in python.

About

Complete UML diagramation and implementation of the card game Copas (Hearts), for the Software Engineering subject in the Computer Science course at Federal University of Santa Catarina.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages