Coder Social home page Coder Social logo

jc's Introduction

jc

A demo application for the chariot library.

Build

Uses Maven and Java 19

$ mvn clean install

Watch

In default mode, jc continuously writes a text board of the featured Lichess TV game to console.

GM DarthMccartney
0:00:20 *
┌───┬───┬───┬───┬───┬───┬───┬───┐
│   │   │   │   │   │   │   │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│   │   │   │   │ ♗ │   │   │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│ ♟ │   │ ♟ │   │   │   │ ♝ │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│ ♙ │   │ ♟ │   │   │   │ ♙ │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│   │   │ ♚ │ ♟ │   │   │   │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│   │   │   │   │   │   │   │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│   │   │   │ ♔ │   │   │   │   │
├───┼───┼───┼───┼───┼───┼───┼───┤
│   │   │   │   │   │   │   │   │
└───┴───┴───┴───┴───┴───┴───┴───┘
0:00:11
Caviar2068

Run with

$ java --enable-preview -jar target/jc-0.0.1-SNAPSHOT-jar-with-dependencies.jar

The above command shows the featured TV game.

Specify "classical", "rapid" or "blitz" to watch that TV channel, or a game id to watch that game.

$ java --enable-preview -jar target/jc-0.0.1-SNAPSHOT-jar-with-dependencies.jar blitz

Play

In play mode, jc creates a seek for a casual Rapid game (15+10) and lets the user input moves in UCI format (e2e4, b8c6 etc) in a text field.
Since playing a game on Lichess needs an account - it is necessary to authorize jc in order for it to be allowed to send moves.
You can either use OAuth2 PKCE or a Personal Access Token with scope board:play.

To run with OAuth2 PKCE,

$ java --enable-preview -jar target/jc-0.0.1-SNAPSHOT-jar-with-dependencies.jar play

To run with a pre-created token,

$ export LICHESS_TOKEN=lip_...
$ java --enable-preview -jar target/jc-0.0.1-SNAPSHOT-jar-with-dependencies.jar play

jc's People

Contributors

tors42 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

nicvagn

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.