← Back to work

Solo Project

The Potion Creation Station

A console-based inventory system for an RPG-style potion shop, built around a self-balancing Red-Black Tree so insertions, deletions, and sorted listings stay fast as the shop's stock grows. Potions carry Strength, Speed, and Health stats, with flexible sorting, search, and a guided walkthrough interface.

SOLO PROJECT C++ DATA STRUCTURES RED-BLACK TREE OBJECT ORIENTED

The Problem

Why a Red-Black Tree

In a lot of RPGs, players collect potions that boost their stats — managing that inventory efficiently (sorting it, finding the strongest item) ends up being a real-world case for picking the right data structure. A plain list means re-sorting on every single change; an unbalanced BST can degrade to O(n) on the wrong input. A Red-Black Tree avoids both problems.

How It Works

Under the hood

Screenshots

A look inside

A console app doesn't screenshot well, so here's an actual run, straight from the README:

Welcome to The Potion Creation Station!
Please select your choice!: 1

Potion name: Elixir of Vitality
Strength: 4
Speed: 3
Health: 5
Potion added!

--- Menu ---
1. Add Potion  2. Display All Potions  3. Search Potion by Name
4. Delete Potion by Name  5. Clear All Potions  6. Change Sorting Method  7. Quit
Please select your choice!: 2

=== Potion List ===
Potion of Giants - STR: 7, SPD: 5, HP: 6 (Total: 18)
Elixir of Vitality - STR: 4, SPD: 3, HP: 5 (Total: 12)

Please select your choice!: 4
Enter potion name: Elixir of Vitality
This Potion has been sent into the depths of the archive, never to be found again!

Reflection

Challenges & what I learned

This was a solo project too, so here's what I personally ran into building a Red-Black Tree from scratch: