Summary
We managed to finish the Tic-Tac-Toe game using the red-green-refactor process. The examples themselves were simple and you probably didn't have a problem following them.
The objective of this chapter was not to dive into something complicated (that comes later), but to get into the habit of using short a and repetitive cycle called red-green-refactor.
We learned that the easiest way to develop something is by splitting it into very small chunks. Design was emerging from tests instead of using a big up-front approach. No line of the implementation code was written without writing a test first and seeing it fail. By confirming that the last test fails, we are confirming that it is valid (it's easy to make a mistake and write a test that is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access