littleflute / cchess0

https://littleflute.github.io/cchess0/
MIT License
0 stars 1 forks source link

https://littleflute.github.io/cchess0/cchess/ii.html #4

Open littleflute opened 7 years ago

littleflute commented 7 years ago

https://littleflute.github.io/cchess0/cchess/ii.html xm.run("v1.1.0");

littleflute commented 7 years ago

//xddbg: ClickMsg.innerHTML = sq_;

littleflute commented 7 years ago

board.clickSquare = function (sq_) { //xddbg: function myA_I (c){ if(c==3) return "a"; if(c==4) return "b"; if(c==5) return "c"; if(c==6) return "d"; if(c==7) return "e"; if(c==8) return "f"; if(c==9) return "g"; if(c==10) return "h"; if(c==11) return "i"; } function my09 (c){ if(c==3) return 9; if(c==4) return 8; if(c==5) return 7; if(c==6) return 6; if(c==7) return 5; if(c==8) return 4; if(c==9) return 3; if(c==10) return 2; if(c==11) return 1; if(c==12) return 0; } var sq = this.flipped(sq); var s = "sq:" + sq; s += "sq:" + sq; s += "xy:" + myA_I(sq & 15); s += my0_9(sq >> 4);

ClickMsg.innerHTML = s;
littleflute commented 7 years ago
                var g1 = board.flipped(g1);
                var g2 = board.flipped(g2);