Code Monkey home page Code Monkey logo

matchymatchy's Introduction

matchymatchy

...a matching colors Flutter game!

The goal is to reproduce the top right pattern on the 9 center squares with as few moves as possible.

STILL IN DEVELOPMENT

Fun fact: this app was entirely developed on emacs!

Architecture

This app implements Didier Boelens' approach to BLoC. The idea is to show data through widgets that react to a bloc's Stream. In order to simplify state management, I've also implemented EventStates: blocs that emit a new widget's state based on an event.

Multiplayer

Multiplayer is handled by Firebase. A Firestore database stores all matches, queue and users information and all endpoints are Firebase Functions written in Typescript (project under directory functions).

  • Queue

When a player looks for a new match, he's put in a FIFO queue and joins a match as soon as an opponent is found. A common target is chosen for them and whoever reaches the goal with the fewest amount of moves wins.

  • Reconnection

Players can leave a match at any time and reconnect later. Active matches are stored on the device thanks to sqflite.

  • Forfeit

Players can forfeit a match. This immediately triggers a win condition for the opponent.

  • Move/Win/Challenge notification

Notifications are handled by Firebase Cloud Messaging. Every time a player is challenged, or an opponent plays a move, both players are notified.

If you want to use the online component, you can create a new Firebase project, create your own google-services.json and put it under android/app.

Singleplayer

The app comes with a sqflite db of 500 combinations of target fields + game fields. A random combination is chosen.

matchymatchy's People

Contributors

dependabot[bot] avatar glodi avatar nzpaper avatar

Stargazers

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