GithubHelp home page GithubHelp logo

moushegh / battleship-javascript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from learnteachcode/battleship-javascript

0.0 1.0 0.0 5 KB

A very very simple Battleship game written in plain JavaScript

Home Page: http://learntocodela.github.io/Battleship-JavaScript/

JavaScript 76.26% HTML 7.85% CSS 15.89%

battleship-javascript's Introduction

Battleship-JavaScript

A very very simple Battleship game written in plain JavaScript: http://learntocodela.github.io/Battleship-JavaScript/

Read about the game and its rules here: https://en.wikipedia.org/wiki/Battleship_(game)

Step 1: Create your files

Useful references:

Step 2: Create a grid on your HTML page for the game board

Useful references:

Step 3: Model the game board in JavaScript and place ships

Useful references:

Step 4: Create event handler and write the game logic

Useful references:

Step 5: Play the game!

Play the game here: http://learntocodela.github.io/Battleship-JavaScript/

Features to implement next:

  • Display game messages within the HTML page instead of using alert()
  • Randomize placement of the ships at the start of each game
  • Make better graphics, maybe add sound effects?
  • Make a 2-player version of the game!

battleship-javascript's People

Contributors

learningnerd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.