项目作者: linrock

项目描述 :
Fast-paced chess tactics trainer
高级语言: Ruby
项目地址: git://github.com/linrock/blitz-tactics.git
创建时间: 2016-09-28T07:24:01Z
项目社区:https://github.com/linrock/blitz-tactics

开源协议:GNU General Public License v3.0

下载


Blitz Tactics

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:

  1. bundle install # install ruby gems
  2. yarn install # install node_modules
  3. rails db:create # set up an empty postgres db: blitz-tactics_development
  4. rails db:migrate # sets up the db schema
  5. yarn lichess:puzzles:fetch # downloads ~125k lichess v1 puzzles as JSON files
  6. yarn lichess:puzzles:import # import puzzles from JSON into the db (15+ min)
  7. yarn lichess:puzzles:check # should confirm the puzzles were loaded
  8. yarn blitz:game_modes:fetch # downloads puzzles used on blitztactics.com as JSON files
  9. yarn blitz:game_modes:import # imports game modes puzzles into the db (6+ min)
  10. 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