;redcode-94 ;name Jack in the box II ;author Beppe Bezzi ;kill Jack ;strategy Same old strategy, improved components ;strategy p-switching Tornado and silk ;assert CORESIZE == 8000 org think ;v 2.03 PIN 3371 _RES equ #0 _STR equ #1 ;more or less 500 :-) step equ -45 DIST away equ 4000 ;more or less 3900 :-) gate1 equ (gate-4) A0 equ 3488 A1 equ 1860 A2 equ 3740 marcia spl 1, <300 ;\ spl 1, <400 ;-\ generate 15 spl 1, <500 ;-/ parallel processes mov -1, 0 ;/ mov -1 ;copy mov.i bomb1, >123 ;bombing silk2 spl @0, }A1 ;split mov.i }-1, >-1 ;copy mov.i bomb1, >1001 ;bombing mov.i bomb , }2042 ;A-indirect bombing mov.i {silk2, A2 ;jmp new copy bomb dat.f >2667, >5334 ;anti-imp bomb bomb1 dat >1, }1 ;anti clear bomb for 12 dat 0,0 rof think res ldp.ab _RES, #0 str ldp.a _STR, str1 ;load strategy in use sne.ab #0, res ;check result lost add.a #1, str1 ;lost change mod.a #2, str1 ;secure result win stp.ab str1, _STR str1 jmp @0, tornado dat 0, marcia for 12 dat 0,0 rof tornado mov gate, }pt2 mov gate, *pt2 mov last, gate1 mov @djmp, >gate1 djmp djn.b clr, {bombs incr dat >-3*step,>-3*step last bombm dat <1, {1 end