Code Monkey home page Code Monkey logo

escape-from-the-maze's Introduction

escape-from-the-maze

npm version Circle CI

A simple & tiny CUI maze game

Installation

npm install -g escape-from-the-maze

Usage

Start game:

escape-from-the-maze

Show ranking:

escape-from-the-maze --ranking
escape-from-the-maze -r

Show help:

escape-from-the-maze --help
escape-from-the-maze -h

Development

git clone [email protected]:kjirou/escape-from-the-maze.git
cd ./escape-from-the-maze
npm install
npm start

escape-from-the-maze's People

Contributors

kjirou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

escape-from-the-maze's Issues

Powerful Refactoring

  • Separate models from stores and lib
  • Rename class files to classified
  • Singleton instances should be exported directly?
  • Try to apply flux-utils (pending)
  • Unify accessor definition rules (get~ or getter) atode-
  • SingletonMixin to singletonMixin
  • Collect states to root-component
  • Stage change to object based
  • Dispatcher misusing
  • consts to constants constants is reseverd module name by node!
  • Separate screen object from input

Stage configurable

difficulty:
  easy:
    mazes:
      0:
        timeLimit: 120
        pickCount: 1
  normal:
  hard:
  lunatic:
  simple:
    mazes:
      0:
        timeLimit: null  # by default
        pickCount: 0  # by default

Write helps

  • Write web-help on GitHub
  • Put a link to welcome page
  • npm run help shows all game rules
  • Write short help to welcome page

Add "Picks" sysytem

  • Player has some picks by default
  • Player use a pick for crushing a wall
  • Player can get more picks in the maze
  • Can configure default pick count

Score server

  • Study AWS S3 / Lambda / API Gateway
  • Save game result by Web-API
    • name[optional, default="unknown"], comment[optional, default=""], stageTypeId, score, created_at(JS timestamp)
  • Add a command for listing
  • Make to look results by daily, weekly, monthly and all

Define action's event names

From:

    let dispatchToken0 = dispatchers.register(({action}) => {
      switch (action.type) {
        case 'fooBarBaz':
          emitter.emit(EVENTS.SOME_EVENT);
          break;
      }   
    }); 

To:

    let dispatchToken0 = dispatchers.register(({action}) => {
      switch (action.type) {
        case consts.ACTIONS.FOO_BAR_BAZ:
          emitter.emit(EVENTS.SOME_EVENT);
          break;
      }   
    }); 

Misunderstood to FPS event

  • Currently, the screen is rendered twice in 1 FPS
    • timer event and @ movement event
  • Drawing only once is correct

Generalize the DialogComponent

ActionCreators.openDialog({
  form: formObj,
  onSubmit: (inputs) => {
    ActionCreators.postData(inputs);
  }
});

โ†“

+-------------------+
|                    |
|  [              ]  |
|                    |
+-------------------+

โ†“

if (key === 'enter') {
  ActionCreators.submitDialog();
}

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.