Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unit tests for game package functions #7

Open
gokultp opened this issue Oct 10, 2018 · 5 comments
Open

add unit tests for game package functions #7

gokultp opened this issue Oct 10, 2018 · 5 comments
Labels

Comments

@gokultp
Copy link
Owner

gokultp commented Oct 10, 2018

No description provided.

@charly3pins
Copy link

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.

@gokultp
Copy link
Owner Author

gokultp commented Oct 13, 2018

@charly3pins do you want to take this up ?

@dskoda1
Copy link
Contributor

dskoda1 commented Oct 27, 2018

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?

@gokultp
Copy link
Owner Author

gokultp commented Oct 27, 2018

@dskoda1 will take a look into this.

@yulrizka
Copy link
Contributor

yulrizka commented Oct 27, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants