Coder Social home page Coder Social logo

arecvlohe / purescript-simon-game Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 110 KB

Simon Game in PureScript

Home Page: https://arecvlohe.github.io/purescript-simon-game/

License: MIT License

HTML 6.72% PureScript 84.05% JavaScript 6.55% CSS 2.68%
purescript purescript-demo purescript-pux purescript-foreign purescript-signal

purescript-simon-game's Introduction

Simon Game in PureScript

This is a replica project of the freeCodeCamp challenge Build a Simon Game. The reason for doing this project was to gain a better understanding of PureScript and the front-end framework Pux. Pux takes many of it's ideas from the Elm architecture so having been familiar with Elm & React/Redux, I was, at least in the outset, comfortable with using this design pattern. There were plenty struggles along the way though, as PureScript's type system is much more expressive than Elm. That means there is a lot more overhead, however it pushed me to think harder about type systems and how valuable they are in developing complex applications. It forced me to know what is happening at each step of the process, which is invaluable.

Special thank you to the PureScript community. I frequently looked for support from the PureScript folks in Slack and Gitter. Without their support I would not have been able to finish this project. Thank you!

User Stories

As a user:

  • I am presented with a random series of button presses
  • Each time I input a series of button presses correctly, I see the same series of button presses but with an additional step
  • I hear a sound that corresponds to each button when I click the button and when the series of buttons plays
  • If I press the wrong button, I am notified I have done so and the series of button presses starts over
  • I can see how many steps are in the current series
  • If I want to restart, I can hit a button to do so, and I return to a single step
  • I can play strict mode where if I get a button press wrong, the game notifies me and the game restarts the current random series from one
  • I can win the game by getting a series of 20 steps correct. I am notified of my victory and I restart with a new random series of buttons presses

Play!

https://arecvlohe.github.io/purescript-simon-game/

purescript-simon-game's People

Contributors

arecvlohe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.