Code Monkey home page Code Monkey logo

bananagram-mk2's People

Contributors

dependabot[bot] avatar jedster1111 avatar jedthompson-anaplan avatar tonyt50 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

bananagram-mk2's Issues

Bananagram game logic should be in a common place.

Functions should be usable in both the frontend and backend. Aim for functions to be pure if possible.

  • Place a piece.
  • Determine if there is a valid peel.
  • Dump a piece (trade a tile for 3 tiles from pile)

I should be able to see a deployed version of the latest code in the master branch

Deploy the frontend using Jenkins, DigitalOcean and DockerHub
AC:

  • Should be deployed when there's a new commit in master and all the tests pass.
  • If the tests fail, the latest version shouldn't be deployed
  • Should use a Dockerfile to create a new image
    • New image should be pushed to DockerHub
    • Deployment should pull the latest image from DockerHub
    • Image should be an NGINX server serving static files.
    • Created in #10

I should be able to change the grid offset

There should be buttons outside the 4 edges of the grid that let you move the offset (can be thought of as moving the camera). This will let you see pieces that have gone outside of the rendered grid.

AC:

  • Buttons outside the grid, in line with the centre of each edge.
  • Clicking the button will move the camera one square in that direction.

I should be able to dump

AC:

  • I can dump a piece and receive three new pieces
  • If there aren't enough pieces left (less than 3) the dump should fail/the button shouldn't be clickable
  • The new pieces should be placed in the top left corner

I can drag and drop a piece/pieces to a new position in the grid

AC:

  • If I mouse down on a piece and drag to an empty square and then mouse up, the piece should move to that position.
    Drag behaviour:
    • No selected pieces
      • mousedown and drag should select the piece clicked and move it.
    • Drag already selected piece
      • mousedown and drag should move the selected piece/s
    • Drag a non-selected piece, while there's another piece selected
      • mousedown and drag should select the clicked piece and move all the selected pieces
  • If your drag replaces an existing piece, for now it should just console.log what pieces were replaced

I should be able to zoom out the grid

AC:

  • Two buttons, one zooms in and one zooms out (i.e. changes the dimensions)
  • The zoom should be focused around the top left hand corner - (0,0)
  • The grid width should be responsive (based on window dimensions), but shouldn't change as the zoom changes
  • The grid shouldn't be able to zoom in more than a 3x3 grid

I should be able to create a game and other people can join

AC:

  • When I create a game it should prompt me for a username
  • After making a game, should show me the url of my game
  • I can join a game by visiting the games' url
  • When I join a game it should also prompt me for a username
  • I should see a list of users in the game

Unit Tests and Linting should be run automatically for new commits in master and for pr branches

Jenkins (other CI/CD tools can be considered) should run tests and feedback into Github.
AC:

  • When PR's are made to merge into master, merging should be blocked till Jenkins has run the unit tests and linting and they have both passed. The tests should be run against a temporary branch where the PR's changes have been merged with master.
  • When there's a new commit in master, the tests should also be run.

I should be able to banana (win the game)

AC:

  • If there are less tiles in the pile than players in the game, I can banana (once all my tiles are connected)
  • If my banana is valid I win the game
    • Should be shown a game over screen
  • If my banana is not valid I lose and my tiles go back into the pile
    • All users should be alerted to the failed banana
    • There should be a visual indication that a player is out of the game.

While playing a game I should be able to peel

AC:

  • Checks all my tiles are connected and words are real
  • If check fails, should display some sort of error notification
  • If check passes, should give a new tile to every player in the game
    • Tile should be placed in the top left corner of the screen and a notification should be shown

Add the ability to select squares in the grid

AC:

  • Click on a piece and it should be selected.
    • If a piece is already selected the existing piece should be unselected.
  • If CMD is held when clicking, piece should be added to the existing selection.
    • If I click on an already selected piece it should be deselected (when CMD is held)
  • If I'm not holding CMD and I click on an empty square, should deselect all pieces.
  • Selected pieces should have a black border.

Front-end should be containerised using Docker

AC:

  • Should use NGINX to serve the static artefacts generated using the build command from Create-React-App.
  • Should only contain the static files, not all of the development files as well.
  • Should expose the port 80.
  • Documentation on building and running the image should be added to the README file.

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.