Jan 19, 2023
Yeah, I don't think my "refactored" version is better than the original one.
Also, the refactoring here is mainly about separating presentation from business logic. It's not necessary for this case (as you said, it's already dead simple and effortless to understand the purpose).
Generally speaking, I prefer to split it when needed, like when changing blue to red, a dot represents 1/12 instead of 1/10 or what so ever — that way, the presentational changes and logic changes can be done separately.
Again, I like the original implementation.