AtelierClockwork

There Isn’t Much, but It Has Tests

This week, I wrote a polling mechanism for checking surrounding cells in a hex grid, returned as a key:value pairs of direction:value. I’m also holding myself to writing tests for all of my model code, I have maybe 20% of my target tests for the surrounding cell cases, but I finished the hard part of figuring out the structure of how to write expressive tests for the functions I’m testing, especially as I purposefully only have abstract access to the internals of the hex grid’s data structure.

I also made all of the code pass swiftlint after a a recommendation from Matt. It’s nowhere near as hard of a taskmaster as Rubocop, but it’s a great start that has community participation. Working with a linter is also a lot easier on a small codebase, and it means that in theory I won’t have huge piles of warnings later.

Up Next

Finish the tests of surrounding hex cells. After that, I think I’ll break ground on the view and controller frameworks, as well as the app bundle itself. That means at least one code session of fiddly integration steps, then writing a very simple controller to get the basic hex grid on screen.