lengyanyu258 / xiangqi.js

A Javascript Chinese chess/cchess/Xiangqi library for Xiangqi move generation/validation, piece placement/movement, and check/checkmate/draw detection
https://lengyanyu258.github.io/xiangqiboardjs/examples.html#5002
BSD 2-Clause "Simplified" License
25 stars 11 forks source link

How can we use this in react? Thanks #6

Open tungleanh92 opened 2 years ago

BaoAn21 commented 1 year ago

copy code in xiangqi.js file, paste it somewhere in your project, then add "export" before const Xiangqi = function(fen) line. Import and use