Giter Site home page Giter Site logo

5001's Introduction

5001, the web browser game!

Game steps

Use case

Cf. paper version, done in the Excel document. Probably outdated and incomplete.

Here is an example of a minimalistic full game scenario. We will split the phase in X :

  1. preparation
  2. game
  3. end

Preparation

Player 1 create a game A Player 2 joins the game A Player 1 start the game A

Game

This use case should cover all the different cases :

Server picks a random players to start. Player 2 starts Player 2 throws the dices Player 2 looose // case 1 : loose Player 1 turn Player 1 throws the dices Player 1 scores 300 Player 1 keep score // case 2 : direct score Player 2 turn Player 2 throws the dices Player 2 score 50 Player 2 choose to continue Player 2 throws the remaining dices Player 2 score 100 // case 3 : cumulative score Player 2 choose to continue Player 2 score 200 Player 2 throw the dices // special case player is forced to throw all the dices Player 2 loose ... etc...

End

Player 2 score > 5000 // last turn Player 1 turn Player 1 loose Server ends the game

Logic

  1. startGame
    1. John starts!
    2. timer player start
    3. activePLayer -> throwDices
    4. otherPlayers -> wait
  2. throwDice
    1. allPlayer -> watchDices
  3. score
    1. if dice score
      1. continue
        1. activePlayer -> chooseDices
        2. activePlayer -> throwDices
        3. otherPlayers -> wait
      2. keep score
        1. save score
        2. nextPlayer

TODO

Testing

Added Mocha for automated testing. Cf http://mochajs.org and http://chaijs.com/api/assert for more info.

Sources

Uses the very nice dice-js & teal dice & teal dice src lib!

5001's People

Stargazers

 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.