Rules of Hog

In Hog, two players alternate turns trying to be the first to end a turn with at least GOAL total points, where GOAL defaults to 100. On each turn, the current player chooses some number of dice to roll, up to 10. That player's score for the turn is the sum of the dice outcomes.

However, a player who rolls too many dice risks:

  • Pig Out.(俚语,狼吞虎咽)

    If any of the dice outcomes is a 1, the current player's score for the turn is 1.

    • Example 1: The current player rolls 7 dice, 5 of which are 1's. The player scores 1 point for the turn.
    • Example 2: The current player rolls 4 dice, all of which are 3's. Since Pig Out did not occur, they score 12 points for the turn.

In a normal game of Hog, those are all the rules.

To spice up the game, we'll include some special rules:

  • Picky Piggy.

    A player who chooses to roll zero dice scores \( (2 \times \vert \texttt{tens} - \texttt{ones} \vert + 1) \) points; where tens, ones are the tens and ones digits of the opponent's score. The ones digit refers to the rightmost digit and the tens digit refers to the second-rightmost digit.

    • Example 1: The opponent has 46 points, and the current player chooses to roll zero dice. \( 2 \times \vert 4 - 6 \vert + 1 = 5 \), so the player gains 5 points.
    • Example 2: The opponent has 73 points, and the current player chooses to roll zero dice. \( 2 \times \vert 7 - 3 \vert + 1 = 9 \).
  • Swine Swap.

    After points of the turn are added to the current player's score, if the resulting score is a perfect square, then swap the scores of both players. A perfect square is any integer \( n \) where \( n = d \times d \) for some integer \( d \).

    • Example 1: At the end of a turn, the current player has score 4 and the other player has score 2. Since 4 is a perfect square, the scores are swapped.
    • Example 2: At the end of a turn, the current player has score 11 and the other player has score 5. Since 11 is not a perfect square, the scores are not swapped.
    • Example 3: At the end of a turn, the current player has score 99 and the other player has score 16. Since 99 is not a perfect square, the scores are not swapped.