Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in both php and html Question #2 Write a sticky, self-processing PHP page that implements a game of paper, scissors, rock, where the user can
in both php and html
Question #2 Write a sticky, self-processing PHP page that implements a game of paper, scissors, rock, where the user can play until they lose 10 times, and their number of wins can be added to an arcade game style "high scores" table. The Game Page The game page should show the current game number, the users number of wins and losses so far, a place for a feedback message, a button/link allowing them to start again, and the form that allows for game interaction (either separate paper, scissors, rock buttons to indicate their choice, or radio buttons and a submit/play button) Each time a choice is submitted, the program should randomly choose paper/scissors/rock, and determine if the user has won or lost. It should update the appropriate sessions variables for wins/losses/game number, and output a message with the game number, the computers choice, the users choice, and an indicator if this means the user won or lost. If the user has lost 10-times they should be directed to the Game Over page. The Game Over Page This page should indicate to the user that their game is over. It should give them an option to enter the name to save their score to the high scores table. This should also be a self-processing form, and on submission, should write the users name and score to the database (in a table you've created for this assignment). It should then redirect the user to the High Scores page. The High Scores Page The high scores page should display the top 20 scores (and names) in the database, nicely formatted in descending order. It should also provide a link where the user can play again. Keep in mind that the highscores table is arcade style, so a user could hold all the spots on the table. Question #2 Write a sticky, self-processing PHP page that implements a game of paper, scissors, rock, where the user can play until they lose 10 times, and their number of wins can be added to an arcade game style "high scores" table. The Game Page The game page should show the current game number, the users number of wins and losses so far, a place for a feedback message, a button/link allowing them to start again, and the form that allows for game interaction (either separate paper, scissors, rock buttons to indicate their choice, or radio buttons and a submit/play button) Each time a choice is submitted, the program should randomly choose paper/scissors/rock, and determine if the user has won or lost. It should update the appropriate sessions variables for wins/losses/game number, and output a message with the game number, the computers choice, the users choice, and an indicator if this means the user won or lost. If the user has lost 10-times they should be directed to the Game Over page. The Game Over Page This page should indicate to the user that their game is over. It should give them an option to enter the name to save their score to the high scores table. This should also be a self-processing form, and on submission, should write the users name and score to the database (in a table you've created for this assignment). It should then redirect the user to the High Scores page. The High Scores Page The high scores page should display the top 20 scores (and names) in the database, nicely formatted in descending order. It should also provide a link where the user can play again. Keep in mind that the highscores table is arcade style, so a user could hold all the spots on the tableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started