To learn more about the game and it's rules Connect Four.
To learn TDD (Test Driven Development).
Implementing the game itself was an easy task, as it's quite similar to Tic Tac Toe. Tricky part was to do it in TDD fashion.
I had to google a lot about, "Ok I know what behavior I want but How will I test it?".
-
I learned about the importance of writing Pure functions as they are easy to test and leads to better design.
-
I learned about Mocking and how it can be used to separate other class functionalities, from the class, which is being tested.
-
I learned that TDD is a discipline, its quite hard to write just enough code to pass the tests.