Display the counts when the player ends the game

Assignment Help Computer Engineering
Reference no: EM132125637

Rock, Paper, Scissors (Please make sure it compiles and include output in answer.)

You will implement a rock-paper-scissors game.

The player enters 1 for Rock, 2 for Paper, or 3 for Scissors.

The computer randomly selects one of the three itself.

The program displays computer and player choices and who won (or if it is a tie).

Ask the player if they would like to play again.

Implement the following features in addition to the game play:

Keep a count of the number of times the player won, lost, and tied. Display these counts when the player ends the game.

Keep a count of the number of times the player selects rock, selects scissors, and selects paper. When the player stops playing display these counts.

Use the rand() function to generate the computers selection:

I.E.

/* initialize random seed. Do this only once at the beginning of the main-function */ srand ( time(NULL) ); int randomNumber; // this variable will hold the random number /* generate secret number: between 1 and 10. Change the 10 to a different value to */ generate random numbers up to that value */ randomNumber = rand() % 10 + 1;
When the player ends the game, display who won the most rounds. Also display the object the game winner won with the most.

Tell the player what they should have chosen to win most of the time. For example, if the computer chose rock 7 out of the 10 times then the player should have chosen paper to win most of the time.

Reference no: EM132125637

Questions Cloud

Write the array a at the start of the iteration : Write the array A at the start of the iteration j=5 of the for loop. What is the value of i at the start of the iteration j=6 of the for loop?
How to run the test in the bluehill program : What are the typical items (input or control) you should include in the test method in the Bluehill program?
Draw the first seven rooted fibonacci trees : How many vertices, leaves, and internal vertices does the rooted Fibonacci tree T_n have, where n is a positive integer? What is its height?
Estimate of the root x1 most nearly is : The angle the line tangent to the function f(x) makes at x = 3 is 57 degrees with respect to the x-axis.
Display the counts when the player ends the game : Keep a count of the number of times the player won, lost, and tied. Display these counts when the player ends the game.
Java collections framework : In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections.
Discuss the roles and functions of is governance : Discuss how the roles and functions of IS governance are changing or should change, as a company considers Cloud and Big Data migrations
Will the packet be forwarded into its base network : What is the network mask used by the router? (in dotted decimal or binary). What is the network portion of the incoming packets IP address?
Determine the average temperature value : Plot the Temperature vs. Time graph. Note that you must adhere to the requirements of a proper engineering plot.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd