Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Core War > Fun Warrior: Sk...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2214 of 2284
Post > Topic >>

Fun Warrior: Skybuck's SpiralV1

by "Skybuck Flying" <spam@[EMAIL PROTECTED] > Feb 20, 2008 at 04:38 AM

;redcode
;name SpiralV1
;author Skybuck Flying
;strategy spiral bombing around itself just for fun
;version 1
;date 20 february 2008
;left upper corner is bombed twice but that s ok

LineSize equ 128

WarriorBegin
WarriorLength equ WarriorEnd - WarriorBegin


 ; place one bomb at the back, then go up
 mov Bomb, @[EMAIL PROTECTED]
 ; increment bomb position vertically with one
 sub.ab #LineSize, BombPosition

 Repeat

 ; add two to bombing length
 add.ab #2, $HorizontalBombingLength

 ; copy HorizontalBombingLength to loop
 mov.b $HorizontalBombingLength, $WarriorBombUpperLineRepeat

 ; then bomb upper line
 WarriorBombUpperLineBegin

  WarriorBombUpperLinePlaceBomb
   mov Bomb, >BombPosition

  WarriorBombUpperLineRepeat
   djn WarriorBombUpperLinePlaceBomb, #0

 WarriorBombUpperLineEnd

 ; then bomb vertical line right

 ; subtract one from bombing position
 sub.ab #1, $BombPosition

 ; add one to vertical bombing length
 add.ab #1, $VerticalBombingLength

 ; copy vertical bombing length to loop
 mov.b $VerticalBombingLength, $WarriorBombRightLineRepeat

 WarriorBombRightLineBegin

  WarriorBombRightLineGoDown
   add.ab #LineSize, BombPosition

  WarriorBombRightLinePlaceBomb

   mov Bomb, @[EMAIL PROTECTED]
  WarriorBombRightLineRepeat
   djn WarriorBombRightLineGoDown, #0


 WarriorBombRightLineEnd

 ; then bomb bottom line

 ; copy HorizontalBombingLength to loop
 mov.b $HorizontalBombingLength, $WarriorBombBottomLineRepeat

 ; then bomb upper line
 WarriorBombBottomLineBegin

  WarriorBombBottomLinePlaceBomb
   mov Bomb, <BombPosition

  WarriorBombBottomLineRepeat
   djn WarriorBombBottomLinePlaceBomb, #0

 WarriorBombBottomLineEnd


 ; then bomb vertical line left

 ; add one to vertical bombing length
 add.ab #1, $VerticalBombingLength

 ; copy vertical bombing length to loop
 mov.b $VerticalBombingLength, $WarriorBombLeftLineRepeat

 WarriorBombLeftLineBegin

  WarriorBombLeftLineGoUp
   sub.ab #LineSize, BombPosition

  WarriorBombLeftLinePlaceBomb

   mov Bomb, @[EMAIL PROTECTED]
  WarriorBombLeftLineRepeat
   djn WarriorBombLeftLineGoUp, #0


 WarriorBombLeftLineEnd

 ; repeat
 jmp Repeat

WarriorData
 Bomb dat $0, $0
 BombPosition dat $0, $WarriorBegin-1
 HorizontalBombingLength dat $0, #WarriorLength
 VerticalBombingLength dat $0, #1

WarriorEnd




 1 Posts in Topic:
Fun Warrior: Skybuck's SpiralV1
"Skybuck Flying"  2008-02-20 04:38:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 11:01:55 CDT 2008.