Git Product home page Git Product logo

battleship---js's Introduction

Battleship Game

This is a simple Battleship game where the computer draws a board where 11 ships are hidden.

The board is 10x10 and internally uses a coordinate system that uses 2-digit strings - "xy" (0-9 each digit).

The ships used in the game can have size 1, 2, 3, 4 or 5.

The size 5 ship is T-shaped and can have 4 possible orientations:

  ▓▓        ▓▓▓▓▓▓        ▓▓      ▓▓
  ▓▓▓▓▓▓      ▓▓      ▓▓▓▓▓▓      ▓▓
  ▓▓          ▓▓          ▓▓    ▓▓▓▓▓▓

The other are linear ships with 2 possible orientations (N-S or E-W).

 4 ▓▓▓▓▓▓▓▓    ▓▓    ▓▓    ▓▓    ▓▓
               ▓▓    ▓▓    ▓▓    1
 3 ▓▓▓▓▓▓      ▓▓    ▓▓    2
               ▓▓    3
 2 ▓▓▓▓        4

 1 ▓▓

Diagram

Contents


Built With

  • Javascript

Getting Started

Run the .....


Prerequisites

This application runs on any browser.


Limitations

The app is awesome!


Diagrams

Flow Diagram

Diagram


License

The MIT license.


Maintainers

See also the list of contributors to this project.


battleship---js's People

Contributors

climao avatar cipluso avatar

Watchers

 avatar

battleship---js's Issues

Add a player board.

Currently the game only shows a "Computer Board" where the program hides its ships and the user tries to find them.
We could add a "User Board" where the user hides his ships and the computer tries to find them.

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.