fkiolaris /
cs425_fall18_hw03
In this assignment, you are required to implement a Questions Game, in the form of a website, using PHP and HTML forms. The pages should be dynamically generated using PHP and the game should consist of 5 questions minimum. The questions that you are going to use must be saved in an XML file, that you will structure yourselves. The questions should have a minimum of three levels of difficulty with a minimum of 25 questions for each level. Use REAL questions. The questions must be selected randomly from the XML file but only asked once. You will only show one question at a time. The score for each question should be based on the level of difficulty. The difficulty of the next question should be selected based on the current question’s answer. If a player answers correctly, the next question should be from a higher level of difficulty. If a wrong answer is given, then the next one should be easier. The first question should be of medium difficulty. During the game, the player should not be aware of the difficulty or if he answered correctly or not, but only when the game has finished. The player should know how many questions he answered so far and how many are left. At the end of the game, the player should see an overall score of his performance that will show the list of the questions (you can use only the numbers), if he answered correctly or not, the difficulty, the score for each answer and his overall score. The player should also have the option to save his score using a nickname; the storing solution for this is up to you, you can use a flat file if you wish. The website/game must consist of the following three pages only: 1. Home Page (index.php): The home/landing page will be the entry point of the website/game. At the beginning, the player should be given a welcoming message and a start button. During the game, the player should only be given one multiple choice question at a time (using HTML forms and radio buttons), a button to move to the next question, a button to end the game, the number of the question that he is currently viewing and how many questions are left. For the last question, the next button should say “FINISH” instead of “NEXT”. At the end of the game, the player should be given the option to save his score using a nickname or return to the beginning. If he chose to save his score, the page should give a success/failure message and return the player at the start automatically (e.g. ‘http-equiv’ meta tag). 2. Help Page (help.php): The help page should have the instruction for the game. 3. High Scores Page (scores.php): The high scores page should show the saved scores by the player’s nickname. Requirements: 1. All pages should have a navigation bar in order for a player to navigate between the pages. The navigation bar should be on top of the page and be there regardless the scrolling position of the page. 2. All pages should have a footer. 3. All pages should have a back-to-top button that will be on the bottom of the page (regardless the scrolling position) that can send a player to the top of the current page. 4. All pages should be responsive, meaning should be able to adjust in all screen sizes, without the need of a horizontal scroll bar. 5. All pages should be able to be viewed correctly the same by all modern browsers (Google Chrome, Mozilla Firefox, MS Edge, Opera, Safari etc.). 6. All pages must have a title, author, description, keywords and favicon (meta tags in head). 7. You are allowed to use the Bootstrap framework for the front-end.