;redcode-94 ;contact pan0178@iperbole.bologna.it ;NSFCWT Round #1 ;name Tom&Jerry ;author Maurizio Vittuari ;assert CORESIZE==8000 ; This is my strategy: ; Status Future status Action ; | | ; Jerry | res=0 --> None | fight with Tom ; | res>0 --> Jerry | fight with Jerry ; Tom | stay in Tom | fight with Tom ; None | res=0 --> None | fight with Tom ; | res=1,2 --> Jerry | fight with Jerry ; | res>2 --> Tom | fight with Tom ; | res=-1 --> None | fight with Tom (1st round!) ; Tom is just a paper, and it's designed to challenge mainly ; in 94m (main purpose: survive!) ; Jerry is a fast scanbomber very similar to Porch Swing ; (just very few changes, Randy forgive me, please ;-) ; it's designed to challenge in 94 (main purpose: kill papers (=mice) !) ; (BTW maybe Tom should kill mices, and Jerry survive... but these things ; work well just in cartoons... ;-) ; by the way I never tested this code at koth! not enought time! :( Tom_str equ #3131 ; Tom identifier Jer_str equ #1313 ; Jerry identifier s_slot equ #313 ; strategy slot ; * * * Thinking routines * * * setNone stp #0, s_slot jmp Tom+1, {-150 strat ldp s_slot, #0 sne Tom_str,strat jmp Tom+1, {-200 ; goto Tom (stay in "Tom" status) res ldp #0, #0 jmz setNone,res ; goto Tom (status "None") sne Jer_str,strat ; skip if we're in "None" status jmp Jerry+1,{-250 ; goto Jerry (stay in "Jerry" status) sne #2, res jmp Jerry, {-350 ; if res=2 goto Jerry in "Jerry" status sne #1, res jmp Jerry, {-400 ; set Jer_str and goto Jerry (res=1) sne #-1, res jmp Tom+1, {-300 ; 1st round! (goto Tom in "None" status) ; jmp Tom ; set Tom_str and goto Tom (res>2) ; * * * Tom * * * step1 equ 3743 step2 equ 1567 step3 equ 1349 istep1 equ 2667 istep2 equ 2668 Tom stp Tom_str,s_slot mov.i imp2, Jerry ; NOTE: without this 2 lines PSpace ; routines WILL NOT work properly mov.i imp2, setNone ; (remember we're 36 warriors!!!!) spl boot, <400 spl 1, <300 spl 1, <500 mov -1, 0 s1 spl step1, #0 mov.i >-1, }-1 s2 spl step2, #0 mov.i >-1, }-1 mov.i gate shift djn clear, {site step dat