How the game will work?
- Firstly, We will take a question input that input will get processed by JavaScript. If no input is provided then the result will be “Sorry but I can’t work with that”.
- If there is an input the user clicks on the ball, we will record it.
- The ball will be shaken and make the number 8 on the ball disappear.
- Once the shaking stops the answer appears and changes the color of the inner circle to green.
- We will finally record the answer in our table and our job will be done.
Create Magic Eight Ball Game in HTML CSS & JavaScript
We are to assume that the person will give us a question as input and once the input question comes in, The Magic Eight ball generates a random answer to the question. We will add a feature where in case of no input the ball says, “Sorry but I can’t work with that”.
Contact Us