GithubHelp home page GithubHelp logo

igakigongo / js-battleship Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.54 MB

Battleship Game developed using ES6 and Webpack following Test Driven Development.

Home Page: https://edward-battleship.netlify.com/

JavaScript 90.37% HTML 2.59% CSS 7.04%

js-battleship's Introduction

Battleship Project

The top level goal is to design the battleship game using Test Driven Development.

The main focus is to demonstrate developer's ability to

  • Write unit tests in JavaScript
  • Use a test runner such as jest to achieve the above goal

Summary of concepts that the developer should be familiar with at this point in time

  • Object Oriented Programming,
  • Objects,
  • Constructors,
  • Factory Functions,
  • The Module Pattern,
  • ES6 Notation,
  • Webpack and Testing with Jest.

Demo

Live Link

For a live preview of the game please visit this link.

Screenshots

Human Player Wins Against The Computer

Human Player Wins Against The Computer

Features

  • In the game, a human player vs a computer player
  • Each player sets up ships on their board. Upon finishing this the board is presented to the opponent
  • During gameplay, the human player cannot see the ships on the board they are interacting with
  • The first player to hit all ships on the opponent's board wins

Desirable Features

  • Allow 2 human players (remote/local) to play in the same game
  • Maintain a scoreboard for different sessions
  • Share scoreboards with friends on a social network
  • Store scoreboard data in a remote database or local storage

Getting Started

  • Clone this repository on your machine.
  • run npm i in the root directory to install all dependencies
  • run npm test in order for jest to run all unit tests and show test results

Prerequisites

The software does not have any prerequisites, but in case you need to modify it, then the following software should be present on you machine

  • NPM node package manage
  • Visual Studio Code or any other modern IDE of your choice as long as it supports editing HTML/CSS/JS files

Installing and/or Running the game

For installation of the above listed software please visit their official websites for a quick start, since no custom settings are required.

For dependencies refer to the getting started section

To run the game

  • Make sure you have installed all dependencies
  • Run this command npm run serve to open the game in the browser and start playing it

Authors

Contact

License

The project and all associated source code are free for redistribution and modification.

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.