I just completed the connect four TDD project. I was wondering if anyone would like to have a look at my project and give me some feedback. I struggled a lot with design decisions in this project (regarding OOP practices), and learning some aspects of rspec. I would also like to hear how some other people chose to solve this problem.
Coming from the knight’s travails project, I originally thought that I should use a graph to represent the connections between board spaces, in order to check the board for wins. However, I found that representing the board as a graph made it trickier to update and display the state of the board. Thus, I chose to represent the board state as an array of arrays (the columns of the board). I also thought it would make sense to store the coordinates of the connected spaces that could possibly win the game in a hash so that checking over them later was easier.
Ultimately I am happy with the decisions I made. Any feedback is appreciated, thanks.