# Drexel University Two Player Game Programming Practice

## a game

To pass the time during long winters, the ancient Nordic people would play the two-player game of BjÃ¶rksnÃ¤s. In this assignment, you’ll implement the game, but play will be against the computer.

During each round, players choose a move, which may be either GÃ¶dishus, DerflÃ¼rg, Kullen, Koppang, or Songesand. The rules are:

• Songesand beats Kullen, GÃ¶dishus
• Kullen beats DerflÃ¼rg, Koppang
• DerflÃ¼rg beats Songesand, GÃ¶dishus
• GÃ¶dishus beats Koppang, Kullen
• Koppang beats Songesand, DerflÃ¼rg

Your program should behave as follows:

• The rules should be printed to the screen
• The user is asked if they’d like to play a round
• if they choose ‘y’, a round is played
• if they choose ‘n’, the program ends
• Until the user has chosen to quit, another round is played.
• In a round of play:
• The user is asked to enter a move, which may be either GÃ¶dishus, DerflÃ¼rg, Kullen, Koppang, or Songesand. The program should continue to prompt the user until a valid move is entered.
• The computer makes a move at random. (Hint: remember how we generated random numbers in class.)
• The program prints the computer’s move, the user’s move, and who is the winner of this round.
• The user is asked if they’d like to continue.
• When the user has decided to quit the game, the program prints the number of:
• rounds played
• times the user won
• times the computer won

## suggestions

An important skill in programming is learning how to break up a big job into smaller tasks.

• Make an outline. Make sure that your outline makes sense. Test it out with real input using pencil and paper. Do this before you start writing code.
• Turn some of the individual steps of your outline into functions. Some obvious choices might be a function which generates the computer’s move at random. Another would be a function which is passed two moves and returns the winner. The goal should be that the functions make your code as readable as your English-language outline. You don’t need to implement all of the functions at first. Just write placeholders (we call these stubs) first and fill them in later.
• Implement and test your stub functions.

Also remember to test things as you go. It’s easier to find a mistake in 5 lines of code than it is to find a mistake in 500 lines of code.

## Why US?

##### 100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

##### Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

##### Original Writing

We complete all papers from scratch. You can get a plagiarism report.

##### Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.