GithubHelp home page GithubHelp logo

sagas-101's Introduction

  1. write a new saga called gameSaga, this saga must react to GAME_START_REQUESTED events and change the game state accordingly.

  2. add a new reducer called targets, and change GameLayout, to render <Target> elements for each item in this state (hint: use a default state)

  3. Add a button to stop the game. When the game is stopped, it must be reset.

  4. implement these rules in using sagas:

  • when a target is clicked, it is destroyed,
  • when a target is destroyed, the score is incremented by (1 * scoreMultiplier),
  • when a target dies by itself, the lives are decremented by 1,
  • each TIME_INTERVAL (defaults to 1 second), the target value decrements by 1,
  • a target dies by itself when its value reaches 0,
  1. update your game:
  • each time a target is spawned, its coordinates are randomly chosen (but bound to the size of the game layout)
  • every seconds, one target with a value of 3 is spawned
  • after 5 killed targets, two are spawned every second
  • after 15 killed targets, three are spawned
  • whenever the player kills 3 targets without losing a life, the scoreMultiplier is doubled
  • whenever the player loses one life, the scoreMultiplier is reset to 1

rule: all of this must be handled from the sagas (e.g: you can not send events from your react components to do that).

  1. Add a way to increase difficulty by changing TIME_INTERVAL.

  2. Make this game fun. (all bonii must be listed when you deliver your game to your bored teacher)

sagas-101's People

Contributors

qpre avatar

Stargazers

 avatar

Watchers

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