Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ preferably The purpose of this assignment is to demonstrate your current level of skill in a programming language. You should complete this assignment

in C++ preferably image text in transcribed
image text in transcribed
The purpose of this assignment is to demonstrate your current level of skill in a programming language. You should complete this assignment using the programming language of your choice that you believe you know BEST. If you are unable to encode a functioning solution to this assignment, you will have a great deal of difficulty succeeding in this coursel PIG is one of a family of games called jeopardy dice gomes, since a player's main decision after each roll is whether to jeopardize previous points they've earned by trying for potentially even greater gains. In PG, all players start with ZERO points, and each turn involves rolling a die to earn points. The first player to earn 100 points or more total shouts "PIGI and wins the game on their turn a player does the following Gets an update of what their current score is. Rolls the die If it's a 1, the player loses any points they've earned SO FAR ON THE CURRENT TURN, is told what their updated score is, and their turn is over. If it's any number other than 1, that number is added to the player's scare. The player is told what their updated of the score is 100 or more, the player shouts "PIG" and the game is over. Otherwise, The player can announce "hold" to give up their turn OR the player can announce roll again" and go back to the "rolls the die step. score is. CHALLENGE Write a program in YOUR FAVORITE PROGRAMMING LANGUAGE where the human user plays PIG against the computer Once either the human or the computer wins, the program should ask if the human wants to play again, otherwise the program should gracefully end. . Be sure to include comments at the top of the program with your name, the language you are using, and the name/purpose of the program include additional comments throughout the code that explain what is occurring at kay spots in the program logie. HINTS: You can simulate dle rolls by generating random numbers between tand 6. If you've never done this before, just google for how to examples The human player can inform their computer opponent if she wants to "holdor "roll again" by answering a question . You can simulate the computer deciding whether he will hold" or roll again" by randomly generating a Bora 1, where O means hold and 1 means 'roll again" The computer is a very poor sport so it's ways appropriate for the computer to taunt the human whether he is winning or losingsor perhaps you want to your computer to be kind and compliment his opponent Your choice EVIDENCE You must submit the code in a format that allows your instructor to view the source then cut/paste and comple/run If she chooses (6.8 Notepad)- DO NOT IUST SUBMIT AN EXECUTABLE! HINTS: You can simulate die rolls by generating random numbers between 1 and 6. If you've never done this before just google for how to examples . The human player can inform their computer opponentit she wants to hold or roll again" by answering question You can simulate the computer decidine whether he will hold or roll again" by randomly generating or a 1, where means "holar and means rosapain The computer is a very poor sport! So it's ways appropriate for the computer to taunt the human whether he is winning or losing or perhaps you want to your computer to be kind and compliment his opponent Your choice EVIDENCE . You must submit the code in a format that allows your instructor to view the source then cut/paste and compile/run if she chooses tes. Notepad). DO NOT JUST SUBMIT AN EXECUTABLEI WARNING: I am unable to open or read your source code YOU WILL RECEIVE A ZERO for this entire hands-on activity. You must submit one test run that shows either the manor computer winning with 100 or more points. This can be simple screenshots showing the program startup and first two turns that is first human turn, first computer turn and the lost turn with either the human or computer winning and declaring "PIG... You can omit all the in-between turns because it will take a while to get through them all RUBRIC 204) Requested evidence was submitted on time and in the format specified (6 pts) 204) Program compiles/runs with no errors or abnormal terminations (6 pts) .COM) Program implements PG logic and gameplay as specified 19 pts) . (3) Code is well formed in the selected language, including comments (pts REMINDEE: The dropbox for this assignment will appear in next week's module The purpose of this assignment is to demonstrate your current level of skill in a programming language. You should complete this assignment using the programming language of your choice that you believe you know BEST. If you are unable to encode a functioning solution to this assignment, you will have a great deal of difficulty succeeding in this coursel PIG is one of a family of games called jeopardy dice gomes, since a player's main decision after each roll is whether to jeopardize previous points they've earned by trying for potentially even greater gains. In PG, all players start with ZERO points, and each turn involves rolling a die to earn points. The first player to earn 100 points or more total shouts "PIGI and wins the game on their turn a player does the following Gets an update of what their current score is. Rolls the die If it's a 1, the player loses any points they've earned SO FAR ON THE CURRENT TURN, is told what their updated score is, and their turn is over. If it's any number other than 1, that number is added to the player's scare. The player is told what their updated of the score is 100 or more, the player shouts "PIG" and the game is over. Otherwise, The player can announce "hold" to give up their turn OR the player can announce roll again" and go back to the "rolls the die step. score is. CHALLENGE Write a program in YOUR FAVORITE PROGRAMMING LANGUAGE where the human user plays PIG against the computer Once either the human or the computer wins, the program should ask if the human wants to play again, otherwise the program should gracefully end. . Be sure to include comments at the top of the program with your name, the language you are using, and the name/purpose of the program include additional comments throughout the code that explain what is occurring at kay spots in the program logie. HINTS: You can simulate dle rolls by generating random numbers between tand 6. If you've never done this before, just google for how to examples The human player can inform their computer opponent if she wants to "holdor "roll again" by answering a question . You can simulate the computer deciding whether he will hold" or roll again" by randomly generating a Bora 1, where O means hold and 1 means 'roll again" The computer is a very poor sport so it's ways appropriate for the computer to taunt the human whether he is winning or losingsor perhaps you want to your computer to be kind and compliment his opponent Your choice EVIDENCE You must submit the code in a format that allows your instructor to view the source then cut/paste and comple/run If she chooses (6.8 Notepad)- DO NOT IUST SUBMIT AN EXECUTABLE! HINTS: You can simulate die rolls by generating random numbers between 1 and 6. If you've never done this before just google for how to examples . The human player can inform their computer opponentit she wants to hold or roll again" by answering question You can simulate the computer decidine whether he will hold or roll again" by randomly generating or a 1, where means "holar and means rosapain The computer is a very poor sport! So it's ways appropriate for the computer to taunt the human whether he is winning or losing or perhaps you want to your computer to be kind and compliment his opponent Your choice EVIDENCE . You must submit the code in a format that allows your instructor to view the source then cut/paste and compile/run if she chooses tes. Notepad). DO NOT JUST SUBMIT AN EXECUTABLEI WARNING: I am unable to open or read your source code YOU WILL RECEIVE A ZERO for this entire hands-on activity. You must submit one test run that shows either the manor computer winning with 100 or more points. This can be simple screenshots showing the program startup and first two turns that is first human turn, first computer turn and the lost turn with either the human or computer winning and declaring "PIG... You can omit all the in-between turns because it will take a while to get through them all RUBRIC 204) Requested evidence was submitted on time and in the format specified (6 pts) 204) Program compiles/runs with no errors or abnormal terminations (6 pts) .COM) Program implements PG logic and gameplay as specified 19 pts) . (3) Code is well formed in the selected language, including comments (pts REMINDEE: The dropbox for this assignment will appear in next week's module

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions