Question: In this assignment you will create a character creation screen for a MMORPG ( Massively Multiplayer Online Role - Playing Game ) using JavaScript closures.
In this assignment you will create a character creation screen for a MMORPG Massively Multiplayer Online RolePlaying Game using JavaScript closures. HTML and CSS Starter Code: GitHub Repo Create an HTML page with a form that allows the user to enter a character name, select a character gender male female, other and select a character class warrior mage, rogue Use CSS to style your form and make it visually appealing. Write a JavaScript function that creates a new character. The function should take the character name, gender, and class as formal parameters and return an object with the following member functions: a getName: Returns the characters name b getGender: Returns the characters gender. c getClass: Returns the characters class. When a user clicks the Create Character form, use your function to create a new character with the entered name, selected gender, and class. Display the characters name, gender, and class on the page. Use CSS to style the information in a way that fits the theme of your game. Hint: Remember to use closures to keep the characters name, gender, and class only accessible through the getName, getGender, and getClass member functions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
