Instructions: Perform all of the requested tasks given below. Description: You are required to build a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Instructions: Perform all of the requested tasks given below. Description: You are required to build a Game of Chance which mirrors the Jamaican childhood game 'Ship Sail! Ship Sail! 'Ow much man deh pon board? (How many men on board)' that was played with roast corn. In this game Player 1 would have some corn kernels in their hand and Player 2 must guess the correct amount of corn kernels held. If Player 2 guesses correctly, he/she would get the kernels from Player 1 to be added to their own bounty. If they guess incorrectly they would have to give Player 1 the amount of kernels equivalent to what Player 1 had in their hand. The game is played until either player choose to quit or either player has no corn kernels left. You are required ... For this game the user will be playing against the computer. At the start of the game, each player (Computer and user) bounty is 100 corn kernels each. The website will automatically generate a number less than the amount of corn kernels that the computer has (This must not be displayed). The user must be allowed to enter the number that he/she believes to be the correct amount of corn kernels the computer has into the website. Game data such as the player's name, date of birth, gender, all the responses from the player, along with an indicator for each of the correct and incorrect answers. The website should display the user's name, total corn kernels won, total corn kernels lost as well as the percentage score for correct answers. The user interface must be organized into 3 sections: (1) Registration, (2) Play, and (3) Results areas. Task 1: (6 marks) Create a new HTML page called index.html. There is to be a form on the web page with the following fields for entering information on each player: User Name, DOB, Email, Age and Gender. i) All fields are required to have the correct entry value. ii) All fields are required to have a unique id. iii) Age must be calculated by the system from date of birth and must be greater than 5. iv) Usernames must be more than three (3) characters in length. v) Email address must be validated to only accept email addresses that end with "@gmail.com". vi) All validations are to be done via HTML tag attributes. 1 Task 2: (8 marks) Create a JavaScript function called Register() that will accept the values entered in the fields listed above, validate all entries using JavaScript validations, and then append the validated content to a global JavaScript array called PlayersData[]. Note that the array must be global for other functions to access it. Task 3: (4 marks) 2 Add a button, called Register to the entry form created in Task 1 and ensure that this button calls Register() from Task 2 whenever it is clicked. After the Register button is clicked, all the fields from Task 1 above and Register button must be disabled, additionally a Quit button, (from Task 10) along with the Play (from Task 5) must now be enabled. Task 4: (15 marks) Create a JavaScript function called PlayGame() that will randomly generate an integer number from 1 to the value of the Computer's bounty to represent the number of corn kernels the computer is holding in its 'hand'. It should show the message "SHIP SAIL, SHIP SAIL, 'OW MUCH MAN DEH PON BOARD!' Player 1 is then asked to guess the amount of corn kernels the computer has by entering a value representing it's guess then clicking a Guess button. Player I's guess should not be greater than the totalCorn value that he/she has. Validate all entries using JavaScript validations. Please Note: Initially, Player I's bounty and the computer's bounty are global variables and should be set to 100. Instructions: Perform all of the requested tasks given below. Description: You are required to build a Game of Chance which mirrors the Jamaican childhood game 'Ship Sail! Ship Sail! 'Ow much man deh pon board? (How many men on board)' that was played with roast corn. In this game Player 1 would have some corn kernels in their hand and Player 2 must guess the correct amount of corn kernels held. If Player 2 guesses correctly, he/she would get the kernels from Player 1 to be added to their own bounty. If they guess incorrectly they would have to give Player 1 the amount of kernels equivalent to what Player 1 had in their hand. The game is played until either player choose to quit or either player has no corn kernels left. You are required ... For this game the user will be playing against the computer. At the start of the game, each player (Computer and user) bounty is 100 corn kernels each. The website will automatically generate a number less than the amount of corn kernels that the computer has (This must not be displayed). The user must be allowed to enter the number that he/she believes to be the correct amount of corn kernels the computer has into the website. Game data such as the player's name, date of birth, gender, all the responses from the player, along with an indicator for each of the correct and incorrect answers. The website should display the user's name, total corn kernels won, total corn kernels lost as well as the percentage score for correct answers. The user interface must be organized into 3 sections: (1) Registration, (2) Play, and (3) Results areas. Task 1: (6 marks) Create a new HTML page called index.html. There is to be a form on the web page with the following fields for entering information on each player: User Name, DOB, Email, Age and Gender. i) All fields are required to have the correct entry value. ii) All fields are required to have a unique id. iii) Age must be calculated by the system from date of birth and must be greater than 5. iv) Usernames must be more than three (3) characters in length. v) Email address must be validated to only accept email addresses that end with "@gmail.com". vi) All validations are to be done via HTML tag attributes. 1 Task 2: (8 marks) Create a JavaScript function called Register() that will accept the values entered in the fields listed above, validate all entries using JavaScript validations, and then append the validated content to a global JavaScript array called PlayersData[]. Note that the array must be global for other functions to access it. Task 3: (4 marks) 2 Add a button, called Register to the entry form created in Task 1 and ensure that this button calls Register() from Task 2 whenever it is clicked. After the Register button is clicked, all the fields from Task 1 above and Register button must be disabled, additionally a Quit button, (from Task 10) along with the Play (from Task 5) must now be enabled. Task 4: (15 marks) Create a JavaScript function called PlayGame() that will randomly generate an integer number from 1 to the value of the Computer's bounty to represent the number of corn kernels the computer is holding in its 'hand'. It should show the message "SHIP SAIL, SHIP SAIL, 'OW MUCH MAN DEH PON BOARD!' Player 1 is then asked to guess the amount of corn kernels the computer has by entering a value representing it's guess then clicking a Guess button. Player I's guess should not be greater than the totalCorn value that he/she has. Validate all entries using JavaScript validations. Please Note: Initially, Player I's bounty and the computer's bounty are global variables and should be set to 100.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
The Niakwa Industries prepared the following statement of earnings and comparative statement of financial position for 2020: The Niakwa Industries prepared the following statement of earnings and...
-
The design of a new road includes a straight stretch that is horizontal and flat but that suddenly dips down a steep hill at 18°. The transition should be rounded with what minimum radius so that...
-
When samples are not representative, they are said to be ________.
-
Identify the research scenario, including the general area of focus. Develop a hypothetical research scenario that would necessitate the use of the Action Research Approach and a Posttest With a...
-
Tim Latimer Corporation had the following transactions. 1. Sold land (cost $12,000) for $10,000. 2. Issued common stock for $22,000. 3. Recorded depreciation on buildings for $14,000. 4. Paid...
-
DataBase managment design. Do the dowsings: 1. Run the sql commands written in ddl.sql file attached 2. Create_a dummy data. You can use "fake data generators" 3. Write followings - Write the query...
-
A sample of 20 items provides a sample standard deviation of 5. a. Compute the 90% confidence interval estimate of the population variance. b. Compute the 95% confidence interval estimate of the...
-
Fran works as a truck driver for her employer, Stacy. Stacy is the owner of the company Stacy's Trucks. In one of her installments, Fran takes a "selfie" to post on her TokTic social media page while...
-
You are evaluating a project that costs $64,000 today. The project has an inflow of $138,000 in one year and an outflow of $54,000 in two years. What are the IRRs for the project? (A negative...
-
Theoretically, the standard deviation of a portfolio can be reduced to what level? Explain. Realistically, is it possible to reduce the standard deviation to this level? Explain.
-
One of the distinctive features of high performing companies is the importance of human capital. These days all organizations have human resource practices functioning whether formally formed or not....
-
What amount must an institution deposit in order to provide scholarships of $15,000 to 10 students each year if the interest rate is 4 percent?
-
Discuss the application of trigonometric functions in the representation theory of Lie groups and Lie algebras.
-
Answer ALL questions. FunkyClothing Ltd are a UK registered company who design and produce sustainable clothing for the fashion market. Their clothing sells both online and in high-street retail...
-
suppose a nickel-contaminated soil 15 cm deep contained 800 mg/kg Ni, Vegetation was planted to remove the nickel by phytoremediation. The above-ground plant parts average 1% Ni on a dry-weight bas...
-
Frank Willingham has the following transactions during the year: Sale of office equipment on March 15 that cost $20,000 when purchased on July 1, 2010. Frank has claimed $5,000 in depreciation and...
-
Van makes an investment in a partnership in 2012. Van's capital contributions to the partnership consisted of $30,000 cash and a building with an adjusted basis of$70,000, subject to a nonrecourse...
-
Carol Harris, Ph.D, CPA, is a single taxpayer and she lives at 674 Yankee Street, Durham, NC 27409. Her Social Security number is 793-52-4335. Carol is an Associate Professor of Accounting at a local...
-
Online electronics retailer Kogan has announced an initial public offering to raise $50 million, with plans to list on the ASX at the end of June. Kogan, founded in 2006, said it would have a market...
-
For each company below, fill in the missing data. Each company is independent. Sales Beginning finished goods Cost of goods manufactured Ending finished goods Cost of sales Income Statement Company X...
-
Innovative Computers Pty Ltd began manufacturing inexpensive computers for the student market on 1 July 2018. The variable costs of manufacturing each computer are as follows. During the year ended...
Study smarter with the SolutionInn App