Skip to content

This is a snake water and gun based game developed using pure vanilla javascript

Notifications You must be signed in to change notification settings

JeremiahRanen7/swg-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake Water Gun Combat

Snake Water Gun Combat is a simple web-based game where you compete against the computer by choosing one of three elements: Snake, Water, or Gun. Each round, both you and the computer make a choice, and the winner of the round is determined based on the rules:

  • Snake drinks Water (Snake wins)
  • Water extinguishes Gun (Water wins)
  • Gun shoots Snake (Gun wins)

The game continues until either you or the computer reaches a score of 5.

How to Play

  1. Clone or download this repository to your local machine.
  2. Open the index.html file in your web browser.
  3. Click on one of the buttons to choose your element: Snake, Water, or Gun.
  4. The computer will also make a choice.
  5. The result of the round will be displayed, and the scores will be updated accordingly.
  6. Continue playing until one player reaches a score of 5.
  7. If you want to play again, simply reload the page.

Technologies Used

  • HTML: Structure of the web page.
  • CSS: Styling the elements and layout.
  • JavaScript: Implementing game logic and interactivity.

Game Logic

The game logic is implemented in JavaScript. Each round, the player's choice is compared to the computer's randomly generated choice, and the winner of the round is determined based on the predefined rules. Scores are updated accordingly, and the game continues until one player reaches a score of 5.

Screenshot:

image

Credits

This game was created by Jeremiah Ranen R. It is inspired by the classic game "Rock Paper Scissors" and provides a fun and interactive way to pass the time.

Feel free to contribute to the project by adding new features, improving the design, or fixing any bugs you encounter. Happy gaming!

About

This is a snake water and gun based game developed using pure vanilla javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published