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

  One of the issues with the component object model com was

research available test case software. what are some features offered by the majority of the products?discuss the

  How you could approach stakeholder that might resist project

In your initial post, identify these stakeholders and describe the strategies you would take to get stakeholder buy-in. Also, describe how you could approach stakeholders that might resist the project.

  Create a list of strings do not ask from the user

Create a list of strings, don't ask from the user, and return a list with the strings in sorted order, except group all the strings that begin with 'x' first.

  Write a java program that prompts the user for input

The first line of the input file will indicate the number of times the program will prompt the user for input (n).

  Discuss what are the economic systems

What are the economic systems in and who are the trading partners of the countries you chose?

  List five applications of personal computers

List five applications of personal computers. Is there a limit to the applications of computers? Do you envision any radically different and exciting applications in the near future? If so, what?

  Explain what improvements are currently being made

Analyse two of the three technologies provided (focus virtualisation, cloud computing and green computing).

  Difference between vertical and horizontal market software

give the difference between vertical and horizontal market software. Please explain/elaborate in detail.

  Plot the spectrum of the output samples

Plot the spectrum of the output samples. What is the 3-dB fading bandwidth? How much of the lime is the signal -4d13 or lower?

  Your contracted health first hospital foundation hhf a

your contracted health first hospital foundation hhf a charitable organization services community clinics atlanta

  Find the month with the most rainfall and the month

Calculate the average monthly rainfall, and find the month with the most rainfall and the month with the least rainfall.

  Generate the list randomly every time using the class

Write a java program to sort a list of integers using 'in place' Quicksort algorithm.

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