Niyaz niyazpk

View gist:1891361
1
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseIn
View gist:1596077
1 2 3 4 5 6 7 8 9 10
var WHITE_PAWN = 0x01;
var WHITE_KNIGHT = 0x02;
var WHITE_KING = 0x03;
var WHITE_BISHOP = 0x05;
var WHITE_ROOK = 0x06;
var WHITE_QUEEN = 0x07;
 
var BLACK_PAWN = 0x09;
var BLACK_KNIGHT = 0x0A;
var BLACK_KING = 0x0B;
View gist:1595963
1 2 3
if (!(square & 0x88)){
// valid move
}
View gist:1595848
1 2 3
if (!(square & 0x40)){
// valid move
}
View gist:1595834
1 2 3 4 5
Decimal 2 = 00000010 Binary
Decimal 1 = 00000001 Binary
Decimal 0 = 00000000 Binary
Decimal -1 = 11111111 Binary
Decimal -2 = 11111110 Binary
View gist:1594941
1 2 3 4
Decimal 62 = 0111110 Binary
Decimal 63 = 0111111 Binary
Decimal 64 = 1000000 Binary
Decimal 65 = 1000001 Binary
View gist:1594896
1 2 3
if (square > 0 && square < 64){
// valid move
}
View gist:1593251
1 2 3
if (row > 0 && row < 8 && column > 0 && column < 8 ){
// valid move
}
View gist:1593175
1 2 3 4 5 6 7
0x07 = 7
0x06 = 7 - 1
0x05 = 7 - 1 - 1
0x04 = 7 - 1 - 1 - 1
0x03 = 7 - 1 - 1 - 1 - 1
0x02 = 7 - 1 - 1 - 1 - 1 - 1
// etc
View gist:1593161
1 2 3 4 5 6 7
0x07 = 7
0x17 = 7 + 16
0x27 = 7 + 16 +16
0x37 = 7 + 16 + 16 + 16
0x47 = 7 + 16 + 16 + 16 + 16
0x57 = 7 + 16 + 16 + 16 + 16 + 16
// etc
Something went wrong with that request. Please try again.