Coder Social home page Coder Social logo

kang-marvin / matching-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 134 KB

Match tiles with the same color and animal as fast as possible

Home Page: https://matching-animal-color-game.fly.dev/en/game

Ruby 51.37% JavaScript 0.66% CSS 0.10% HTML 17.91% Shell 0.27% Dockerfile 7.48% TypeScript 22.20%
rails stimulus-js tailwindcss viewcomponents typescript

matching-game's Introduction

MATCHING GAME

How To Play

The board contains tiles in 2s that contain the same color and image. Try to match all the matching tiles in successive clicks as fast as possible.

The levels of difficulty are

  • 2 by 2 (Easy)
  • 4 by 4 (Standard)
  • 6 by 6 (Hard)

Stack Used

  1. Ruby on rails
  2. Stimulus JS docs
  3. ViewComponent docs
  4. Tailwind docs

What I learned

  1. Major / Core Lessons
-> Stimulus JS and how it works. How to create controllers, use targets and actions. Also how the Outlets API works

-> How to use ViewComponents to design standalone view `partials` or components. How to use render? to hide UI if condition fails among other benefits

-> Tailwind and its classes. How to support dynamic classes by adding them to `safelist` inside tailwind.config.js
  1. Minor Lessons / Reminders
-> Using ruby Array#product to create matrix
-> Using Stimulus JS to change URI params
-> Use redirect to have root path with `/url_path`
-> `private` functions inside Stimulus controllers

Hosted

The app can be found here

It is hosted on Fly.io

matching-game's People

Contributors

kang-marvin 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.