Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PA 2: Plaisante Card Game 🃏

Learning Objectives

In this assignment, you’ll build the key visual and logic components of Plaisante, a Data Structures exclusive card game with mechanics inspired by the popular indie roguelike video game Balatro[1]. You can play a free variation of Balatro here to get a sense of the game.

At its core, Balatro involves the player attempting to make the highest scoring poker hands from a set of playing cards they’ve been dealt. These poker hands include: high card, pair, two pair, three of a kind, straight, flush, full house, and four of a kind.

The rhythm of a round works as follows:

Once the player has submitted the max number of scored hands, the round is considered over. The total score of all submitted scored hands is evaluated against a target score for the round. If the player hits or surpasses the target, they get an opportunity to purchase bonuses (jokers) that modify scoring or card rules before going onto a new round with a higher target score.

Plaisante simplifies the Balatro mechanics by only playing one full round and removing the joker modifiers (removing the need for a target score, since there is no progression). A player will start with 8 cards in their hand (and will draw up to that number after submitting or discarding a set of cards), will have up to 4 discards, and must submit 4 scored hands for a round to be complete. The goal for our player is to try and score as many points as possible during that round!

Below is a video of the game in action:

Suppose that we are part of a game company working on Plaisante. We cannot build an entire game all by ourselves, so different components will be divided up between the programmers in the company. For this assignment, we are part of the team that is building the visual and hand logic components of the game.

Specifically, in Part 1, we build the Card class, which knows what card it represents, how to draw itself, and how to animate itself across the screen.

In Part 2, we build the logic for how hands are scored and keep track of where cards are in the hand using Lists.

Footnotes
  1. Balatro is a Latin word for jester or joker, and Plaisante was the title of female jesters in 16th century France.