Random line of code thread
category: code [glöplog]
For all two player games..
Code:
int sch_AlphaBeta(int depth, int alpha, int beta)
{
if (depth == 0)
return Evaluate();
GenerateLegalMoves();
while (MovesLeft()) {
MakeNextMove();
val = -sch_AlphaBeta(depth - 1, -beta, -alpha);
UnmakeMove();
if (val >= beta)
return beta;
if (val > alpha)
alpha = val;
}
return alpha;
}
Code:
love.graphics.draw(starBuffer, (x + size + (size / 10)), y + (size / 10), 0, .1, .1)
Code:
move.l .opc(pc),a4 ; points to "move.w d5,d6;lsl.w #8,d6" = $3c05e14e, treated as $5e14e (68000 only)
Code:
[BAR * 25, "Hard to hear from you clearly, feel it really"],
[BAR * 25.5, "If we're never worlds apart"],
[BAR * 28, "[extended keytar noodling]"],
[BAR * 36, "[yes, it's still going]"],
Code:
wine ~/Downloads/winuae64_6.0.0.exe -f runner.uae -G
0x0842, // 3: jmp x--, 2 side 1
Code:
errors[charset][character][charline] = __builtin_popcount(character ^ charsets[charset][convert[charset][character][charline]][charline]);
Code:
tst.l ReturnCode(pc)
1poke 53280,0:poke53281,0:print chr$(5)
2print mid$("NM",1-(rnd(1)>.5),1);:goto2
3rem c64, any cbm. thats shift NM
2print mid$("NM",1-(rnd(1)>.5),1);:goto2
3rem c64, any cbm. thats shift NM
Code:
stop #$2700
Code:
rs (:++ - :+) / 2
Code:
450 IF whtn6=>100 THEN 'here comes the great mountain of shit
Code:
ldh [rNR{d:CNUM}2],a
Code:
const numLines = ev.target.value.trim().split("\n").map((line) => Math.ceil((line.trim().length + 1) / charsPerLine)).reduce((a,b) => a+b, 0);
This is my random number generator.
Code:
short rnd(int *seed) {
return ((*seed = *seed * 214013L + 2521011L)>>16)&0x7fff;
}
Not one line, but one row:
Courtesy of Hannibal :)
Code:
move.l (a1)+,d2
move.l (a1)+,d3
divu.w #1,d0
movem.l (a1)+,d4-d6
lsl.w d0,d7
movem.l (a1)+,d7/a0/a2
movem.l (a1)+,a3-a5
lsl.w d0,d1
lea.l 44(a6),a6
move.w (a1)+,d1
movem.l d2-d7/a0/a2-a5,-(a6)
move.w d1,(a7)
Courtesy of Hannibal :)