top of page

Rummikub

Data Structures: Recursion

A program that analyzes a given hand of tiles and determines if a solution can be found according to simplified rules of Rummikub

With a partial interface provided, this assignment was focused on translating our understanding of how recursive functions worked by recursively analyzing a hand of tiles and seeing if a solution is possible based on a simplified rules of Rummikub.


This code doesn't handle "playing" the game. The code supports adding tiles (an object with a number and color) to a "hand" and then, when requested, goes through the hand to see if there is a possible solution. If a solution is found, the code returns the determines runs / groups; otherwise, it returns nothing.


The program was placed through multiple tests. With a few given unit tests where the solution was clear and evident as well as exhaustive tests where the program was given a solvable, random hand to solve, the program passed with flying colors!

!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.

Below is completed interface for this assignment. The initial template was provided - the only portion that is my code are the items within the private section of the class towards to bottom of the sample.

!
Widget Didn’t Load
Check your internet and refresh this page.
If that doesn’t work, contact us.
bottom of page