GithubHelp home page GithubHelp logo

Comments (2)

jbkunst avatar jbkunst commented on June 5, 2024
> library(rchess)
> library(magrittr)
> 
> chss <- Chess$new()$
+   move("g4")$
+   move("e5")$
+   move("f3")
> 
> chss$moves()
 [1] "Nc6"  "Na6"  "Qe7"  "Qf6"  "Qg5"  "Qh4#" "Ke7"  "Be7"  "Bd6"  "Bc5"  "Bb4"  "Ba3"  "Nh6" 
[14] "Nf6"  "Ne7"  "a6"   "a5"   "b6"   "b5"   "c6"   "c5"   "d6"   "d5"   "f6"   "f5"   "g6"  
[27] "g5"   "h6"   "h5"   "e4"  
> 
> plot(chss, type = "ggplot")

image

You can't move the queen yet.

chess.js dont give more explicit messages and I just verified if the move you want to do exist in the possible moves.

from rchess.

pssguy avatar pssguy commented on June 5, 2024

I see now.
You have to put the checkmate in i.e. "Qh4#"
foolsmate

from rchess.

Related Issues (14)

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.