Write some Software

create the double hog game in python

The game of ‘Double Hog’

You are to construct computer program for a game called ‘Double Hog’

Double Hog is a fun dice game played using two six-sided dice.

Below are the rules for the game.


Usually played between 2 people. However, the program should allow for 2 to 4 players.


The first person to reach 100 points is the winner.


On a turn, a player rolls the dice repeatedly until either:

• a single 1 is rolled

• the player chooses to hold (stop rolling)

If either of the above occurs, it is the next player’s turn.


If a player rolls:

• a single 1 – their turn ends and the total value of both dice is deducted from their score (eg if they throw a 1 and a 3, 4 is deducted from their score; 1+5 will mean 6 is deducted from their score

[NOTE: It is possible for players to have a negative score eg “-6”]

• double 1s – player gets 25 points

• other doubles (eg 2+2, 3+3) – player gets double points (eg 2+2 counts as 8; 3+3 counts as 12; 4+4 counts as 16)

• in all other cases – the player gets the total of both dice (eg 3+4 counts as 7 points; 2+3 counts as 5 points)

Game End

When a player reaches a total of 100 or more points, that player is the winner, and the game ends.

Double Hog Program

General structure of program

1. Greet the user(s) and give a brief description of the game.

2. Show main menu. Example of what could be included in main menu:

a. Play a game

b. See the rules

c. Exit

3. If user chooses to play a game:

a. Ask how many players there are

b. Get names of players

c. Randomly select the order in which players will roll the dice

d. Start game by asking Player 1 to roll the dice when they are ready

e. Display the value of each of the two dice rolled

f. If player has rolled:

• a single 1 – display message indicating the number of points that will be deducted from their score and that it is the next player’s turn; decrement player’s score as per the rules

• two 1s – display congratulations message indicating that they have been awarded 25 points; increment player’s score by 25; display current scores for each player (‘scoreboard’); ask current player if they would like to roll again or hold

• anything else – increment player’s score as per the rules; show scoreboard; ask player whether they want to roll or hold.

g. Repeat (f) as long as Player 1 chooses to roll and they do not roll a single 1.

h. When it is the next player’s turn, repeat (f) and (g), until a player reaches 100 (or more).

i. When a player reaches 100 (or more) - declare them as the winner; ask user whether they would like to play another game, or exit.

4. If the user chooses to see the rules:

a. display rules (NOTE: For the purposes of this task, it is not important that the content of these rules are correct – you could just use ‘placeholder’ text)

b. give the user the option to play a game or exit

Kỹ năng: Brain Storming, Python

Xem thêm: write software create app, software create video spokesperson, nda software create, software create magazine, software create template joomla

Về Bên Thuê:
( 0 nhận xét ) New Zealand

Mã Dự Án: #14901495

4 freelancer đang chào giá trung bình $44 cho công việc này


console style user interface. 8 - 24 hours . completed game / source code in you hands before you pay well commented , well structured code. Relevant Skills and Experience - python - conole games - student assignment Thêm

$85 NZD trong 1 ngày
(19 Đánh Giá)

Hi, I'm available to do your project, I'm very experienced in python. Contact me on chat Stay tuned, I'm still working on this proposal.

$46 NZD trong 1 ngày
(5 Đánh Giá)

I am a computer engineering student and experienced python developer. I'm new to this site so I'm still building my reputation, but I can guarantee I'll deliver quality work as soon as it can be done

$16 NZD trong 2 ngày
(4 Đánh Giá)

Hi, sir! I have a close look to your project. I have a good skill in python programming. If you award this project to me, we'll complete it in time. Our budget may be negotiable Thanks Stay tuned, I'm still working o Thêm

$28 NZD trong 1 ngày
(1 Đánh Giá)