Giter Site home page Giter Site logo

kyokumen's Introduction

局面.js

ウェブで将棋の棋譜を語るための JavaScript ライブラリ https://junkoda.github.io/kyokumen/

できること

  • SFEN (Shogi Forsyth-Edwards Notation) を与えて、局面図を作る
  • 棋譜にマウスカーソルをあわせると局面図を更新する

使いかた

局面図を作る

<figure class="kyokumen" data-sente="先手" data-gote="後手"
data-sfen="lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b 1"></figure>

局面図を変更する

<span class="mv"
data-sfen="lnsgkgsnl/1r5b1/pppppp1pp/6p2/9/2P6/PP1PPPPPP/1B5R1/LNSGKGSNL b 2">☗7六歩</span>

<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="https://junkoda.github.io/kyokumen/0/kyokumen.css">
  <title></title>
</head>
<body>
<script src="https://junkoda.github.io/kyokumen/0/kyokumen.js"></script>

<figure class="kyokumen" data-sente="先手" data-gote="後手"
     data-sfen="8l/1l+R2P3/p2pBG1pp/kps1p4/Nn1P2G2/P1P1P2PP/1PS6/1KSG3+r1/LN2+p3L w Sbgn3p 124">
</figure>

<p><span class="mv" data-sfen="lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b 1">初手</span></p>

</body>
</html>

SFEN editor

開発中のSFENエディタ editor/editor.js

https://junkoda.github.io/kyokumen/editor/

script

  • script/kif2sfen.py

kif ファイルから SFEN を生成。

Updates

開発状況は

に書いています。バグ報告・質問など気軽にしてください。

kyokumen's People

Stargazers

asa2yoru avatar Nazarii Yovenko avatar  avatar Brandon "TZ" Barton avatar

Watchers

Brandon "TZ" Barton avatar James Cloos avatar Jun Koda 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.