# SE475 Design Journal - Week 8 ### 11/2 Given that the design doc was completed and the project's APIs has been created and stubbed out by the division leader, the implementation was relatively easy. I use Random class to generate a number between 1 to 1000 and compare it with a probability map calculated based on current level. For the most part, I was practising how to write testable code. At first, I put everything in one single method. When I started to write unit tests, I found it really hard to test only certain part of the code. I started to refactor the code into smaller pieces for testing, which made writing the unit tests a lot easier. With the experience of writing unit tests in Project 1, there wasn't any huge challenge in particular for me.