🐷
A game of Pig
Exercise: Solve this problem in Go. Write code and test cases too.
Labels: Beginner
Time to complete: 1-2 days
What will you learn: math/rand, for loops, conditionals, accepting input from cli, declaring struct and its methods, fmt package, using flag or cobra for building CLIs
How to evaluate your solution:
I haven’t yet evaluated the solution to this program written by many developers. If you have solved this problem and want your code reviewed, please ping me on Twitter or LinkedIn with your repo link. Ensure your repo has a good readme, makefile and working implementation of all three stories. This problem is difficult to test drive and write test cases for (due to the side effect of rolling a die).
How to evaluate your solution:
I haven’t yet evaluated the solution to this program written by many developers. If you have solved this problem and want your code reviewed, please ping me on Twitter or LinkedIn with your repo link. Ensure your repo has a good readme, makefile and working implementation of all three stories. This problem is difficult to test drive and write test cases for (due to the side effect of rolling a die).
How to evaluate your solution:
I haven’t yet evaluated the solution to this program written by many developers. If you have solved this problem and want your code reviewed, please ping me on Twitter or LinkedIn with your repo link. Ensure your repo has a good readme, makefile and working implementation of all three stories. This problem is difficult to test drive and write test cases for (due to the side effect of rolling a die).
How to evaluate your solution:
I haven’t yet evaluated the solution to this program written by many developers. If you have solved this problem and want your code reviewed, please ping me on Twitter or LinkedIn with your repo link. Ensure your repo has a good readme, makefile and working implementation of all three stories. This problem is difficult to test drive and write test cases for (due to the side effect of rolling a die).
How to evaluate your solution:
I haven’t yet evaluated the solution to this program written by many developers. If you have solved this problem and want your code reviewed, please ping me on Twitter or LinkedIn with your repo link. Ensure your repo has a good readme, makefile and working implementation of all three stories. This problem is difficult to test drive and write test cases for (due to the side effect of rolling a die).
Actual Solution:
Actual Solution:
Actual Solution:
Actual Solution:
Actual Solution: