Shogi Bot recognizes vague descriptions. Each section is optional and case-insensitive. The notation order does not matter except Origin (must be before Destination) and Promotion (must be at the end).
41 |
42 |
1. Destination
43 |
The simplest way to text your move is just to put a destination. Western, Japanese, and CSA notations are acceptable.
44 |
45 |
Western notation: '1a', '7f', '9i', etc.
46 |
Japanese notation: '1一', '7六', '9九', '11', '76', '99', etc.
47 |
CSA notation: '11', '76', '99', etc.
48 |
49 |
If your notation is ambiguous, additional choice buttons will show up.
50 |
You can omit this notation if your destination is the same as the preceding piece.
51 |
52 |
2. Origin
53 |
To resolve ambiguity, you can also include the coordinate of the origin. The notation is same as Destination. This part must be before Destination.
54 |
55 |
3. Piece
56 |
Shogi Bot accepts both Western, CSA, and other common notations.
57 |
58 |
Pawn: 'P', 'F', 'FU'
59 |
Promoted Pawn: '+P', 'PP', 'T', 'TO'
60 |
61 |
Lance: 'L', 'KY'
62 |
Promoted Lance: '+L', 'PL', 'NY'
63 |
64 |
Knight: 'N', 'KE'
65 |
Promoted Knight: '+N', 'PN', 'NK'
66 |
67 |
Silver: 'S', 'GI'
68 |
Promoted Silver: '+S', 'PS', 'NG'
69 |
70 |
Gold: 'G', 'KI'
71 |
72 |
Bishop: 'B', 'KA'
73 |
Promoted Bishop: '+B', 'PB', 'U', 'UM', 'H'
74 |
75 |
Rook: 'R', 'HI'
76 |
Promoted Rook: '+R', 'PR', 'RY', 'D'
77 |
78 |
King: 'K', 'OU', 'GY'
79 |
80 |
81 |
4. Drop or Simple Move
82 |
83 |
Drop: '*', '00'
84 |
Simple Move: '-', 'x'
85 |
86 |
87 |
5. Promotion
88 |
You can specify a promotion flag at the end of your text.
89 |
90 |
Promote: '+', 'naru', 'nari'
91 |
Unpromote: '=', 'narazu'
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp3/TO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
54 |
--------------------------------------------------------------------------------
/docs/assets/js/lz-string.min.js:
--------------------------------------------------------------------------------
1 | var LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;ne;e++){var s=r.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;t>e;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":i._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(n){return o(e,r.charAt(n))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(o,r,n){if(null==o)return"";var e,t,i,s={},p={},u="",c="",a="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;ie;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++),s[c]=f++,a=String(u)}if(""!==a){if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(n(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(o,n,e){var t,i,s,p,u,c,a,l,f=[],h=4,d=4,m=3,v="",w=[],A={val:e(0),position:n,index:1};for(i=0;3>i;i+=1)f[i]=i;for(p=0,c=Math.pow(2,2),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(t=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 2:return""}for(f[3]=l,s=l,w.push(l);;){if(A.index>o)return"";for(p=0,c=Math.pow(2,m),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(l=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 2:return w.join("")}if(0==h&&(h=Math.pow(2,m),m++),f[l])v=f[l];else{if(l!==d)return null;v=s+s.charAt(0)}w.push(v),f[d++]=s+v.charAt(0),h--,s=v,0==h&&(h=Math.pow(2,m),m++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module&&(module.exports=LZString);
2 |
--------------------------------------------------------------------------------
/docs/assets/js/WebAudioAPISound.js:
--------------------------------------------------------------------------------
1 | try {
2 | window.AudioContext = window.AudioContext || window.webkitAudioContext;
3 | window.audioContext = new window.AudioContext();
4 | } catch (e) {
5 | console.log("No Web Audio API support");
6 | }
7 |
8 | if ("audioContext" in window) {
9 | /*
10 | * WebAudioAPISoundManager Constructor
11 | */
12 | var WebAudioAPISoundManager = function (context) {
13 | this.context = context;
14 | this.bufferList = {};
15 | this.playingSounds = {};
16 | };
17 |
18 | /*
19 | * WebAudioAPISoundManager Prototype
20 | */
21 | WebAudioAPISoundManager.prototype = {
22 | addSound: function (url) {
23 | // Load buffer asynchronously
24 | var request = new XMLHttpRequest();
25 | request.open("GET", url, true);
26 | request.responseType = "arraybuffer";
27 |
28 | var self = this;
29 |
30 | request.onload = function () {
31 | // Asynchronously decode the audio file data in request.response
32 | self.context.decodeAudioData(
33 | request.response,
34 |
35 | function (buffer) {
36 | if (!buffer) {
37 | alert('error decoding file data: ' + url);
38 | return;
39 | }
40 | self.bufferList[url] = buffer;
41 | }
42 | );
43 | };
44 |
45 | request.onerror = function () {
46 | alert('BufferLoader: XHR error');
47 | };
48 |
49 | request.send();
50 | },
51 | stopSoundWithUrl: function(url) {
52 | if(this.playingSounds.hasOwnProperty(url)){
53 | for(var i in this.playingSounds[url]){
54 | if(this.playingSounds[url].hasOwnProperty(i))
55 | this.playingSounds[url][i].noteOff(0);
56 | }
57 | }
58 | }
59 | };
60 |
61 | /*
62 | * WebAudioAPISound Constructor
63 | */
64 | var WebAudioAPISound = function (url, options) {
65 | this.settings = {
66 | loop: false
67 | };
68 |
69 | for(var i in options){
70 | if(options.hasOwnProperty(i))
71 | this.settings[i] = options[i];
72 | }
73 |
74 | this.url = url + '.mp3';
75 | window.webAudioAPISoundManager = window.webAudioAPISoundManager || new WebAudioAPISoundManager(window.audioContext);
76 | this.manager = window.webAudioAPISoundManager;
77 | this.manager.addSound(this.url);
78 | };
79 |
80 | /*
81 | * WebAudioAPISound Prototype
82 | */
83 | WebAudioAPISound.prototype = {
84 | play: function () {
85 | var buffer = this.manager.bufferList[this.url];
86 | var bufferLoaded = typeof buffer !== "undefined";
87 | //Only play if it's loaded yet
88 | if (bufferLoaded) {
89 | var source = this.makeSource(buffer);
90 | source.loop = this.settings.loop;
91 | source.start(); // old -> .noteOn(0)
92 |
93 | if(!this.manager.playingSounds.hasOwnProperty(this.url))
94 | this.manager.playingSounds[this.url] = [];
95 | this.manager.playingSounds[this.url].push(source);
96 | }
97 | return bufferLoaded;
98 | },
99 | stop: function () {
100 | this.manager.stopSoundWithUrl(this.url);
101 | },
102 | getVolume: function () {
103 | return this.translateVolume(this.volume, true);
104 | },
105 | //Expect to receive in range 0-100
106 | setVolume: function (volume) {
107 | this.volume = this.translateVolume(volume);
108 | },
109 | translateVolume: function(volume, inverse){
110 | return inverse ? volume * 100 : volume / 100;
111 | },
112 | makeSource: function (buffer) {
113 | var source = this.manager.context.createBufferSource();
114 | var gainNode = this.manager.context.createGain(); // old -> createGainNode()
115 | // gainNode.gain.value = this.volume; // deprecated
116 | gainNode.gain.setTargetAtTime(this.volume, 0, 0.01);
117 | source.buffer = buffer;
118 | source.connect(gainNode);
119 | gainNode.connect(this.manager.context.destination);
120 | return source;
121 | }
122 | };
123 | }
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/BTO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
58 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/TO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
58 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/BTO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
59 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | =======================================
2 | Shogi Playground: an online shogi board
3 | =======================================
4 |
5 | Visit `Shogi Playground `_.
6 |
7 | .. image:: https://readthedocs.org/projects/mog-playground-docs/badge/?version=latest
8 | :target: https://mog-playground-docs.readthedocs.io/en/latest/?badge=latest
9 | :alt: Documentation Status
10 |
11 | .. image:: https://badges.gitter.im/shogi-playground/community.svg
12 | :target: https://gitter.im/shogi-playground/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
13 | :alt: Gitter
14 |
15 |
16 | What is shogi?
17 | ==============
18 |
19 | Shogi, also known as Japanese chess, is a two-player strategy board game native to Japan. The shogi board has nine by nine squares, and there are eight different piece types. It is said that such pieces were invented as early as the 12th century, yet the present form was established in the 16th century. One of the rules that distinguish shogi from other chess variants is the drop rule. It allows captured pieces to be returned to the board by the capturing player.
20 |
21 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/shogi.jpg
22 | :align: right
23 |
24 | [1]_
25 |
26 |
27 | Shogi has been the most popular board game in Japan for centuries (in fact, much more popular than Western chess), and professionals have been greatly respected by all Japanese population. Recently, the first non-Japanese shogi professional `Karolina Styczyńska `_ and the progeny `Sota Fujii `_ have made headlines many times, acquiring new shogi fans all over the world.
28 |
29 | Please refer to `Wikipedia `_ for further information.
30 |
31 |
32 | What is Shogi Playground?
33 | =========================
34 |
35 | Shogi Playground is a lightweight, mobile-friendly website where anyone can manage, analyze, and share shogi games as well as mate problems. Without any installation --other than an HTML5-compatible web browser, Shogi Playground provides an out-of-the-box online shogi board with which one can play around. The look and feel will be optimized for your screen. For example, more panels will be shown on a PC, and you can just flick your finger to move a piece on a mobile screen.
36 |
37 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/init_pc.jpg
38 | :align: center
39 |
40 | Appearance on PC/tablet
41 |
42 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/init_mobile.jpg
43 | :align: center
44 |
45 | Appearance on mobile
46 |
47 | As you move pieces and change positions on the board, Shogi Playground issues different URLs for each position. You may create a shortened URL for free, which is quite handy for sharing with the audience of your social networks. (As a bonus, this shortened URL comes with a nice thumbnail image on Twitter and Facebook!) As far as I know, Shogi Playground is the first website that has employed the idea of **Shogi Record as a URL**.
48 |
49 |
50 | Who uses Shogi Playground?
51 | ==========================
52 |
53 | As of August 2018, Shogi Playground has been accessed from 90 different countries since the launch in the previous year. Frequent users include professional Karolina Styczyńska and members of the Facebook group `Shogi Mania `_.
54 |
55 | - `Shogi Harbour by Karolina Styczyńska `_
56 |
57 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/shogi_harbour.jpg
58 | :align: left
59 |
60 | This website uses the embedded version of Shogi Playground.
61 |
62 |
63 | Features
64 | ========
65 |
66 | With Shogi Playground you can
67 |
68 | - record your shogi games
69 | - create sharable links for games and mate problems
70 | - create highly-customizable shogi diagrams
71 | - manage record with files (CSA/KIF/KI2 supported)
72 | - analyze games
73 | - embed a playable shogi board onto your website
74 |
75 | and more!
76 |
77 |
78 | Development principles
79 | ======================
80 |
81 | I, the developer of Shogi Playground, hereby promise the followings.
82 |
83 | - Tool for everyone, regardless of language and location
84 | - Lightweight, mobile-friendly interface
85 | - No ads
86 | - No selling of users' data
87 | - Free, reliable service
88 | - Consistent improvement
89 |
90 |
91 | For developers and contributors
92 | ===============================
93 |
94 | Please refer to the `Developer Guide `_ and `Wiki Page `_.
95 |
96 |
97 | .. [1] Picture taken from https://free-materials.com/
98 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/BNK.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
60 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/BFU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
61 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/WTO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/BFU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/NY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
63 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/FU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
64 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/NK.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
64 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/KY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
64 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/WTO.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
64 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/BNY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
64 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp3/NY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
65 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/WFU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
65 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp3/NK.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
66 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/WFU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
66 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/BNY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
66 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp3/FU.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/NG.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/BNK.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/KE.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
67 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp5/BNG.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
68 |
--------------------------------------------------------------------------------
/docs/assets/img/p/jp2/KI.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
68 |
--------------------------------------------------------------------------------
/docs/assets/img/p/hd1/BKY.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
68 |
--------------------------------------------------------------------------------