Giter Club home page Giter Club logo

minesweeper's Introduction

Minesweeper

To run the project execture

make run

Structure

The project has been divided into client and server in order to test the funcionality using the client in a browser.

Ideally it would have test (unit, integration, acceptance, e2e, cdc, ...) but time limitations made it not possible.

For the WS management I've decided to use socket.io for bot the client and the server, given it provides some built in functionality, like rooms which made the task easier.

Client

The client is a Create React App instance with redux in order to manage the state

Server

A simple WS server on top of socket.io and the native http node library. For a prodution scenario something like express would be needed in order to server the static files for the client which will replace the http server to be resued by the WS.

Considerations

Error handling wasn't implemented due to limitation of time. Testing wasn't implemented due to limitation of time. The storage service is intentionally in memory because it's easier to implement for this use case but could be easliy moved to redis or something like that.

How to test it

Start the application using make run, click the Start a new game button, open that same url in a another tab / window / browser and start revealing squares in both, both tabs should be in sync.

Going further

It wouldn't be difficult to create a list of active games in the Homepage so the users could join one if they want to.

minesweeper's People

Contributors

lordoffreaks avatar

Watchers

 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.