How many sticks to pick up using a random number generator

Assignment Help Computer Engineering
Reference no: EM132208337

Write a program in C# (C Sharp)

user plays a game of Pick Up Sticks.

The children (computer) start with 200 energy points (EP), and any points the babysitter (user) wins or loses are subtracted from EP. The user wins when EP <= 0, and the user loses if EP exceed 300. Points should carry across games within the session.

Potential extra, allow the user to stop playing the game between sessions and pick up where they left off.

Before the user starts a game, display the rules for that game.

As the user finishes each game, the user should have the option to play again or return to the main menu.

If at any point the user wins (EP hits 0) or loses (EP breaks 300)...

Let the user know

Display summary of game:

How many games were played

How many of those games user won

How many of those games user lost

Game should end, points should be reset to starting EP, user should be given the option to replay or quit

The menu should also have an option to start the game over (return
to 200 EP) or exit the application

Pick Up Sticks Game

•There is a pile of sticks on the ground, and the user and computer take turns picking up 1, 2, or 3 sticks a turn. The player who has to pick up the final stick is the loser

•Allow user to choose how many sticks will be in the pile (between 20 and 100)

•User will take the first turn

•One EP is given for every stick the winner picks up. Losing player doesn't get any points

•Computer will chose how many sticks to pick up using a random number generator, until it becomes strategic to pick up a certain number (i.e. when there are three sticks left, it wouldn't be strategic to pick up three sticks and lose the game. The computer would chose a random number between 1 and 2.)

•Potential extra: build out the computer's strategy

•At the end of the game, the user should be able to choose to play again or return to menu.

The Scoreboard shoud include:

•How much energy the "babysitter" has expended from the "children"

•May be negative if the "babysitter" isn't doing a great job

•How much energy the "children" still have

•How many games the "babysitter" has won

•How many games the "babysitter" has lost

Reference no: EM132208337

Questions Cloud

Write an equation representing expected value of buying car : Write an equation representing the Expected Value (EV) of buying a car. If the proportion of cars that are high quality is 0.2, would there be a market for.
Describe the social worker job activities : Submit by Day 3, a 4- to 5-page written account of your agency visit. Describe the social worker's job activities and professional roles
Evaluate the statement using given information : If we as individuals would continue to spend more than we made, we would sooner or later have to pay up or go bankrupt. Our government is in the same position.
What is the accounting profit you project for your business : You are considering getting a Little Nero Caesar Salad Franchise, because your boss (the owner of a Down Under Sandwich Shoppe) seems to be making it big.
How many sticks to pick up using a random number generator : How many sticks to pick up using a random number generator, until it becomes strategic to pick up a certain number.
What is your conclusion based on the results : Interpret your coefficients. What is your conclusion based on the results? What are the possible problems with your findings?
Find the difference in the tax payments for the car company : A car manufacturing company starts with the gross income of $4,500,000 with $2,500,000 of operational costs including payments of its workers.
Write a program which alternately prints hello : Write a program which alternately prints "Hello, world!" and "Buy Coca-Cola!" for fixed intervals, between screen clears, indefinitely.
What level of measurement is best for your variables : What level of measurement is best for your variables? Would you use hierarchical (and which type) or k-means? Why did you make your choice?

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