Code Monkey home page Code Monkey logo

battleships-tech-test's Introduction

Battleships tech test

Setup:

  • git clone https://github.com/samjbro/battleships-tech-test.git
  • npm init
  • run tests with npm test
  User Stories (implemented)
    As a player,
    So I can set up my side of the game,
    I want to add a ship to my board.

    As a player,
    So I can control the placement of my ships,
    I want to place them at a specified location, and have them report their location.

    As a player,
    So I can avoid collisions,
    I want to be prevented from placing my ships at occupied positions.

    As a player,
    So I can know if a ship was hit,
    I want it to report a hit or miss.

    As a player,
    So I can know when a ship was sunk,
    I want it to report when it sinks.

    As a player,
    So I can know if I can keep playing,
    I want to have lost when all my ships are sunk.

    As a player,
    So I can play a coherent game,
    I want my board to have a bounded size.

  User Stories (unimplemented)
  Wave 1:

    As a player,
    So I can avoid illegal ship placement,
    I want to be prevented from placing a ship outside my board.

    As a player,
    So I can give my fleet variety,
    I want to be able to choose the size of my ship.

    As a player,
    So I can have fine control over ship placement,
    I want to specify the orientation of placed ships.

  Wave 2:
    As a player,
    So I can have a meaningful game,
    I would like to have an opponent.

    As a player,
    So I can attack my opponent,
    I would like to be able to fire on their board.

    As a player,
    So I can have a meaningful game,
    I would like my opponent and I to take turns to fire.

    As a player,
    So I can know the outcome of my moves,
    I want to know if I have hit/miss/sunk one of my opponent's ships.

    As a player,
    So I can have a meaningful game,
    I want my opponent to fire at my board on their turn.

    As a player,
    So I can consider my next shot,
    I want an overview of my hits and misses.

    As a player,
    So I know when the game is over,
    I want to be told when I have won or lost.

    Wave 3:

    As a player,
    So I can play against a human opponent,
    I want to have the option of a two-player game.

battleships-tech-test's People

Contributors

samjbro avatar

Watchers

James Cloos avatar  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.