Skip to content

Instantly share code, notes, and snippets.

@tetsuzuki
Created February 20, 2014 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tetsuzuki/9107351 to your computer and use it in GitHub Desktop.
Save tetsuzuki/9107351 to your computer and use it in GitHub Desktop.
function Pos(dan,suji){
this.dan = dan;
this.suji = suji;
}
Direction = [];
Direction[0] = new Pos(0,1); //←
Direction[1] = new Pos(1,1); //←↓
Direction[2] = new Pos(1,0); //↓
Direction[3] = new Pos(1,-1); //→↓
Direction[4] = new Pos(0,-1); //→
Direction[5] = new Pos(-1,-1); //→↑
Direction[6] = new Pos(-1,0); //↑
Direction[7] = new Pos(-1,1); //←↑
Direction[8] = new Pos(-2,1); //先手の桂馬飛び
Direction[9] = new Pos(-2,-1); //先手の桂馬飛び
Direction[10] = new Pos(2,1); //後手の桂馬飛び
Direction[11] = new Pos(2,-1); //後手の桂馬飛び
var CanGo = [
//←
[
// 歩香桂銀金角飛玉と杏圭全金馬竜
0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,
// 歩香桂銀金角飛玉と杏圭全金馬竜
0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1
],
//中略
];
var CanJump = [
//←
[
// 歩香桂銀金角飛玉と杏圭全金馬竜
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
// 歩香桂銀金角飛玉と杏圭全金馬竜
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
],
//中略
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment