Open gokultp opened 6 years ago
@charly3pins do you want to take this up ?
its a pretty major refactoring to do what @charly3pins. One of the biggest difficulties i encountered doing #25 was the game draw
loop was called from multiple places. Centralizing the caller of this could make future enhancements easier. @gokultp are you interested in digging into this?
@dskoda1 will take a look into this.
Oh I didn't see this issue, sorry if someone already picked it up, I noticed there was panic on isWon, I created unit test while fixing it, see #27
I noticed the logic of the game is coupled with the logic of drawing, My recommendation is to split that for testability
Maybe would be nice to split more the functionalities in a different files, bc the game.go has a lot of responsibility now and it's hard to test all bc are too coupled.