Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use a Javascript program to create a game of snake, water and gun. The user will be asked to enter S, W or G. The

Use a Javascript program to create a game of snake, water and gun. The user will be asked to enter S, W or G. The computer should be able to randomly generate S, W or G and declare a win or loss using an alert. You can use confirm and prompt whenever required. Examples of Winning cases are as follows:

a. If the user enters the snake and the computer enters the water, then the user is the winner.

b. If the user enters the water and the computer enters the gun, then the user is the winner.

c. If the user enters the gun and the computer enters the snake, then the user is the winner.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions