Coder Social home page Coder Social logo

ezrider / blitz-tactics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linrock/blitz-tactics

0.0 0.0 0.0 7.51 MB

Fast-paced chess tactics trainer

Home Page: https://blitztactics.com

License: GNU General Public License v3.0

JavaScript 0.82% Ruby 41.16% TypeScript 15.59% HTML 12.36% Vue 8.73% Sass 14.35% Slim 6.99%

blitz-tactics's Introduction

A free and open-source website for playing fast-paced chess puzzles!

If you want to play random puzzles each time:

  • Three - three minutes, three lives, three hints.
  • Haste - correct moves gain time, mistakes lose time.

These puzzles change daily:

  • Countdown - solve puzzles before time runs out
  • Speedrun - solve puzzles as quickly as you can

For more ways to play:

  • Repetition - solve every puzzle quickly and precisely to unlock the next level
  • Infinity - play through endless puzzles and set your own difficulty

Development

The backend uses Rails 6, Ruby 2.7.3, and Node 12.x LTS. Postgres 9 is used for the database. Chess puzzle data is imported into the database from JSON data files.

The frontend uses a modified version of Chessground for the interactive chessboard and chess.js for chess logic. User interfaces are implemented with Vue 3 and some legacy Backbone.js code. Webpack 4 and Sprockets 4 are both used for asset compilation.

Development instructions

First make sure your dev environment is set up for Ruby and Typescript development. You'll need Yarn and maybe a Ruby version manager like chruby or RVM. Then from within your git clone of the codebase, these steps will get you a dev environment with the chess puzzles used on the site:

bundle install    # install ruby gems
yarn install      # install node_modules

rails db:create   # set up an empty postgres db: blitz-tactics_development
rails db:migrate  # sets up the db schema

yarn lichess:puzzles:fetch   # downloads ~125k lichess v1 puzzles as JSON files
yarn lichess:puzzles:import  # import puzzles from JSON into the db (15+ min)
yarn lichess:puzzles:check   # should confirm the puzzles were loaded

yarn blitz:game_modes:fetch  # downloads puzzles used on blitztactics.com as JSON files
yarn blitz:game_modes:import # imports game modes puzzles into the db (6+ min)
yarn blitz:game_modes:check  # prints the number of puzzles in the db for each game mode
  • Run a rails dev server: rails s
  • Run a webpack dev server: yarn dev or ./bin/webpack-dev-server

Go to http://localhost:3000/ and you'll see the Blitz Tactics homepage if all went well.

Special thanks

  • Stepmania - inspiration for the original game mechanics
  • lichess - tactics puzzles and awesome community's feedback

blitz-tactics's People

Contributors

linrock avatar dependabot[bot] 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.