Hog Game
As the first computer programming projects, one of my friends and I designed a dice game done by two players. With reaching 100 points as the goal of the game, we added multiple rules that determined the players points each rounds and total score. Below is the screenshots of our code. I am in the process of developing the UI design so it is easier for more people to play the game.
Foundation codes that lets a player roll a dice and return the sum of the numbers with an exception of 1 (special rule described below)
Free Bacon rule
If A) a player rolls 0 dice in a round and B) the first and the last digit of the cubed number of the opponent’s score is the same, the player in the round switches the score with the opponent
Codes that initiate the players’ taking turn
Detailed codes for Free Bacon rule discussed above and for taking turns each round