Reference no: EM131857136
Problem
Write an Ada program that plays the game "rock, paper, scissors." In this game, two players choose simultaneously either rock, paper, or scissors. Whether a player wins or loses depends not only on that player's choice but also on the opponent's. The rules are:
- Rock breaks scissors: rock wins.
- Paper covers rock: paper wins.
- Scissors cuts paper: scissors wins.
- All matching combinations are ties.
Each player uses the editor to prepare a text file containing his or her choices for a number of games. Choices are Rock, Paper, and Scissors. (In your program, use an enumeration type for these choices.) Each choice for a game is on a separate line. It may have blanks before and after it. Your program should read the choices from the two files and determine and display those choices and the winner of each game. After all games have been played, display the total number of games played, the number of games won by each player, and the number of tie games. Because the players have not agreed in advance on the number of games to play, your program should terminate when all of the choices in one file have been played. If a particular choice for a game is not spelled correctly, that player forfeits the game. If both players have invalid choices, it is considered a tie game. An appropriate message should be displayed if one or both players' choice is invalid. The invalid choice should not be displayed.
Committing suicide in nineteenth-century england
: In early nineteenth-century England, a person who committed suicide was required by law to be buried at a crossroads with a stake through his or her heart.
|
Define sentence as a sequence of words followed by a period
: We define a sentence as a sequence of words followed by a period, exclamation mark, or question mark.
|
Physical and psychological effects on people
: Several psychiatric and penal facilities report a marked improvement in behavior of individuals placed in pink-colored rooms.
|
Writing process and the stages of writing
: What is the difference between the writing process and the stages of writing?
|
Write an ada program that plays the game rock paper scissors
: Write an Ada program that plays the game "rock, paper, scissors." In this game, two players choose simultaneously either rock, paper, or scissors.
|
Active leadership and reflective leadership
: What are the settings or conditions under which each might be most appropriate? Which style do you most identify with and why?
|
Coleridge views of nature differ from that of wordsworth
: Use "This Lime Tree Bower, My Prison" or "Frost at Midnight" to answer this question.
|
Appealing to an english-speaking audience
: If Hollywood were to make a film version of Azuela's The Underdogs, what changes would have to be made to the novel to make it more appealing.
|
Write a procedure called delete-text-file that prompts
: Write a procedure called Delete_Text_File that prompts the user to enter the name of an external text file and then deletes that file.
|