All Projects

The KnightShift

A Data Structures & Algorithms assignment at Futuregames Warsaw, where I implemented several gameplay systems on top of a provided tower-defense-style game using specific data structures for each problem.

Role: Course AssignmentUnityC#
The KnightShift

The KnightShift is a starter project provided for the course; my task was to implement a set of card and combat systems inside it, each requiring a deliberate choice of data structure. I built the card deck using two Stacks (draw and discard), including a Fisher-Yates-style shuffle that moves cards between them.

The Firewall spell uses a Queue to grow outward from the clicked tile in an alternating North/South pattern, only enqueuing walkable nodes.

The Fireball spell uses a HashSet-based flood fill, expanding frontier-by-frontier in the four cardinal directions over three iterations to avoid revisiting tiles.

For Chain Lightning, I built a custom tree structure from scratch (a small node class with parent/children references), recursively linking each unit to its 3 closest unvisited neighbors within range, then finding the deepest node in the tree (breaking ties randomly) and tracing the parent chain back to the root to build the lightning's path.

For Damage Over Time effects (like burning), I used a List on each Unit to track multiple simultaneous effects since they need mid-list insertion/removal, and a Dictionary on a separate BurningManager to track which tiles are burning and for how long, refreshing the duration if a tile gets re-ignited. I documented my data structure choices with comments directly in the code, as required by the assignment.