Course:Cpsc312:/connections

From UBC Wiki

Authors: Adrian, Andrew, Dan

What is the problem?

That there isn't connections but in Haskell bruh!


We aim to emulate the NY times popular puzzle game "Connections" with a focus on computer science terms and topics. The game will prompt the player with a collection of 16 words and it's up to them to discover connections between words and form correct groups of 4 words each. Each incorrect group created will cause the player to lose a life, and four mistakes will mark defeat. However, if the player is able to correctly arrange all 4 groups of words then they can rest easy knowing they bested our challenging puzzle.

What is the something extra?

We offer players the option to define words that they are unfamiliar with to help them form accurate connections. This option is not offered in the original Connections game and can make it difficult to figure out the connections between different words. Also, as all of our words are centered around computer science topics, this feature further allows players to gain a better understanding of the terms and concepts used. Furthermore, we also formatted the UI by creating a grid for the words and adding colour to the console output to make it easier to understand.

What did we learn from doing this?

Error warnings are not always reliable to debug from. Since GHCI allows developers to interact with their code as they are writing it, we should have tested more frequently to avoid bugs. For example, when we first ran our main method, we were getting errors that referenced a line of code that wasn't actually the issue, but arising from multiple errors obfuscating the real issue. The error message led us to believe that it was an indentation error. To solve this, we tested line-by-line until we realized that we were calling a function in the code that was incomplete. This methodology resolved our issues.

There was a learning curve to developing this game using functional programming and certain approaches we originally had were changed. For instance, we wanted to represent our data as json, but it was not trivial to do so using Haskell, so we simply wrote it in our Haskell files.

Work division

Our group worked very collaboratively together in-person which allowed us to have great communication and avoid any conflicts in design when working synchronously. Everybody contributed equally towards discussions for the game idea, the design for our data types and data storing/parsing, as well as the overall implementation of the game.

Links to code etc.

https://github.com/wallstarr/haskellnections