Find Jobs
Hire Freelancers

Write some Software

$14-30 NZD

Closed
Posted over 6 years ago

$14-30 NZD

Paid on delivery
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. Players Usually played between 2 people. However, the program should allow for 2 to 4 players. Goal The first person to reach 100 points is the winner. Gameplay 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. Scoring 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
Project ID: 14901495

About the project

3 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $49 NZD for this job
User Avatar
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 assignments Proposed Milestones $85 NZD - completed project
$85 NZD in 1 day
5.0 (41 reviews)
6.0
6.0
User Avatar
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 in 1 day
5.0 (6 reviews)
3.4
3.4
User Avatar
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 in 2 days
4.7 (4 reviews)
2.1
2.1

About the client

Flag of NEW ZEALAND
New Zealand
0.0
0
Member since Aug 10, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.