Course:CPSC312-2018 Smart Dots and Boxes

From UBC Wiki

Smart Dots and Boxes

Authors: Kushal Mohee & Isabel Zorrilla Steenbock

What is the problem?

We intend to implement the game of dots and boxes using Haskell. The game consists of an empty grid of dots, two players take turns adding a single horizontal or vertical line between two unjoined adjacent dots. The player who completes the fourth side of a 1×1 box earns one point and takes another turn. The game proceeds until the “board” is completely filled with boxes. Find more details here

What is the something extra?

We plan to implement the visual representation of the game using the Graphics.Gloss package of Haskell. The game will be expected to show in a window and will be playable with a mouse.

The human player will be able to play against a computerized player.

What did we learn from doing this?

1) To write a game abstraction

2) How to use Haskell packages namely the Graphics.Gloss package

3) To adapt our code such that it fits a pre-existing libraries

4) To test our code exhaustibly and make sure it has the desired behaviour

5) To debug haskell programs in GHCi

Our code:

https://github.com/kmohee/dotsNboxes