Main.WikiSandbox History

Hide minor edits - Show changes to markup - Cancel

May 07, 2007, at 04:12 PM by Tilendor -
Changed lines 1-5 from:

HackeD?

Akum4 And Wolw3rin3

Akum4@msn.com

to:

Feel free to use this page to experiment with the Text Formatting Rules. Just click the "Edit Page" link at the bottom of the page.


(:source lang=grobocode tabwidth=3 :)
#code
#vector Destination

GoThere:
   Destination seek-location
   return

Destination!
      GoThere^
   then
   return
GetToSafety: ;Put x,y on stack
#vector loc
   loc!
   loc position 9 in-range if
       10 loc position v- angle pi + polar-to-rect position v+


#const NeedFoodChannel 2 3 4 5 6 11111 .1
BroadcastNeedFood: ;Put x,y, and percentage of energy on stack.
   3 NeedFoodChannel send
   return

#const EnemyChannel 1 5 324 875 98239
BroadcastEnemy: ; Put the enemys x,y on stack
   2 EnemyChannel send
   return

#type Solar
#hardware
energy 100 10
solar-cell 1
constructor 1.5
engine .01
armor 50
robot-sensor 10
#code
#var Build 1
   10 10 Destination!
Main:
   GoThere^
   constructor-remaining nif
      Build 1 = 2 1 ifev Build!
      Build constructor-type!
      constructor-max-rate constructor-rate!
   then
   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy^
      robot-position GetToSafety^
   then
   energy max-energy .2 * < if
      position energy max-energy / BroadcastNeedFood^
   then
   EnemyChannel messages if
      do
         EnemyChannel messages
      while
         EnemyChannel receive drop GetToSafety^
      loop
   then
   Main& jump

#type EatFood
#hardware
energy 400 20
solar-cell .01
engine .02
food-sensor 10
robot-sensor 10
syphon 2 6
eater 2

#code

   20 20 Destination!
   GoThere^
Main:
   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy^
      robot-position GetToSafety^
   then
   10 periodic-food-sensor if food-found and-if
      food-position Destination!
   then
   GoThere^
   EnemyChannel messages if
      do
         EnemyChannel messages
      while
         EnemyChannel receive drop GetToSafety^
      loop
   then
   energy max-energy .5 * if
      do NeedFoodChannel messages while
         NeedFoodChannel receive drop drop Destination!
         syphon-max-rate negate syphon-rate!
         Destination position v- rect-to-polar syphon-angle!
syphon-distance!
      loop
   then
   Main& Jump
#end
March 14, 2007, at 12:16 AM by Akuma - Hacked
Changed lines 1-5 from:

I'm making a link to JonLi? webpage

to:

HackeD?

Akum4 And Wolw3rin3

Akum4@msn.com

May 23, 2006, at 11:16 AM by Tilendor -
Changed lines 1-106 from:

Feel free to use this page to experiment with the Text Formatting Rules. Just click the "Edit Page" link at the bottom of the page.


(:source lang=grobocode tabwidth=3 :)
#code
#vector Destination

GoThere:
   Destination seek-location
   return

Destination!
      GoThere^
   then
   return
GetToSafety: ;Put x,y on stack
#vector loc
   loc!
   loc position 9 in-range if
       10 loc position v- angle pi + polar-to-rect position v+


#const NeedFoodChannel 2 3 4 5 6 11111 .1
BroadcastNeedFood: ;Put x,y, and percentage of energy on stack.
   3 NeedFoodChannel send
   return

#const EnemyChannel 1 5 324 875 98239
BroadcastEnemy: 
   2 EnemyChannel send
   return

#type Solar
#hardware
energy 100 10
solar-cell 1
constructor 1.5
engine .01
armor 50
robot-sensor 10
#code
#var Build 1
   10 10 Destination!
Main:
   GoThere^
   constructor-remaining nif
      Build 1 = 2 1 ifev Build!
      Build constructor-type!
      constructor-max-rate constructor-rate!
   then
   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy^
      robot-position GetToSafety^
   then
   energy max-energy .2 * < if
      position energy max-energy / BroadcastNeedFood^
   then
   EnemyChannel messages if
      do
         EnemyChannel messages
      while
         EnemyChannel receive drop GetToSafety^
      loop
   then
   Main& jump

#type EatFood
#hardware
energy 400 20
solar-cell .01
engine .02
food-sensor 10
robot-sensor 10
syphon 2 6
eater 2

#code

   20 20 Destination!
   GoThere^
Main:
   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy^
      robot-position GetToSafety^
   then
   10 periodic-food-sensor if food-found and-if
      food-position Destination!
   then
   GoThere^
   EnemyChannel messages if
      do
         EnemyChannel messages
      while
         EnemyChannel receive drop GetToSafety^
      loop
   then
   energy max-energy .5 * if
      do NeedFoodChannel messages while
         NeedFoodChannel receive drop drop Destination!
         syphon-max-rate negate syphon-rate!
         Destination position v- rect-to-polar syphon-angle!
syphon-distance!
      loop
   then
   Main& Jump
#end
to:

I'm making a link to JonLi? webpage

April 25, 2006, at 02:24 PM by 137.201.242.130 -
Changed line 28 from:

BroadcastEnemy?: ; Put the enemys x,y on stack

to:
April 25, 2006, at 02:23 PM by 137.201.242.130 -
Changed line 27 from:
  1. const EnemyChannel? 1 5 324 875 98239link text
to:
  1. const EnemyChannel? 1 5 324 875 98239
April 25, 2006, at 02:22 PM by 137.201.242.130 -
Changed lines 27-28 from:
  1. const EnemyChannel? 1

BroadcastEnemy?: ; Put the enemy's x,y on stack

to:
  1. const EnemyChannel? 1 5 324 875 98239link text

BroadcastEnemy?: ; Put the enemys x,y on stack

April 25, 2006, at 02:22 PM by 137.201.242.130 -
Changed line 22 from:
to:
  1. const NeedFoodChannel? 2 3 4 5 6 11111 .1
April 25, 2006, at 02:21 PM by 137.201.242.130 -
Changed lines 6-8 from:
to:
Added lines 11-14:

Destination!

      GoThere?^
   then
   return
Changed lines 20-22 from:

Destination!

      GoThere?^
   then
to:

  1. const NeedFoodChannel? 2

BroadcastNeedFood?: ;Put x,y, and percentage of energy on stack.

   3 NeedFoodChannel? send
Changed lines 27-30 from:

BroadcastNeedFood?: ;Put x,y, and percentage of energy on stack.

   3 NeedFoodChannel? send
   return
to:
  1. const EnemyChannel? 1
April 24, 2006, at 10:53 PM by 72.24.29.85 -
Added lines 23-26:

BroadcastNeedFood?: ;Put x,y, and percentage of energy on stack.

   3 NeedFoodChannel? send
   return
Deleted lines 30-33:

BroadcastNeedFood?: ;Put x,y, and percentage of energy on stack.

   3 NeedFoodChannel? send
   return
April 24, 2006, at 10:53 PM by 72.24.29.85 -
Changed line 27 from:

BroadcaseNeedFood?: ;Put x,y, and percentage of energy on stack.

to:

BroadcastNeedFood?: ;Put x,y, and percentage of energy on stack.

April 24, 2006, at 10:51 PM by 72.24.29.85 -
Changed lines 4-14 from:

Check-Comm:

	do
		2 messages
	while
		2 receive drop 2dup vPollen!
		position 2.4 in-range if
			time 20 + FeedPollen?!
			return
		then
	loop
	return
to:
  1. code
  2. vector Destination
  3. const EnemyChannel? 1
  4. const NeedFoodChannel? 2

GoThere?:

   Destination seek-location
   return

GetToSafety?: ;Put x,y on stack

  1. vector loc
   loc!
   loc position 9 in-range if
       10 loc position v- angle pi + polar-to-rect position v+

Destination!

      GoThere?^
   then
   return

BroadcastEnemy?: ; Put the enemy's x,y on stack

   2 EnemyChannel? send
   return

BroadcaseNeedFood?: ;Put x,y, and percentage of energy on stack.

   3 NeedFoodChannel? send
   return

  1. type Solar
  2. hardware

energy 100 10 solar-cell 1 constructor 1.5 engine .01 armor 50 robot-sensor 10

  1. code
  2. var Build 1
   10 10 Destination!

Main:

   GoThere?^
   constructor-remaining nif
      Build 1 = 2 1 ifev Build!
      Build constructor-type!
      constructor-max-rate constructor-rate!
   then
   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy?^
      robot-position GetToSafety?^
   then
   energy max-energy .2 * < if
      position energy max-energy / BroadcastNeedFood?^
   then
   EnemyChannel? messages if
      do
         EnemyChannel? messages
      while
         EnemyChannel? receive drop GetToSafety?^
      loop
   then
   Main& jump

  1. type EatFood?
  2. hardware

energy 400 20 solar-cell .01 engine .02 food-sensor 10 robot-sensor 10 syphon 2 6 eater 2

  1. code

   20 20 Destination!
   GoThere?^

Main:

   10 periodic-robot-sensor if robot-found and-if
      robot-position BroadcastEnemy?^
      robot-position GetToSafety?^
   then
   10 periodic-food-sensor if food-found and-if
      food-position Destination!
   then
   GoThere?^
   EnemyChannel? messages if
      do
         EnemyChannel? messages
      while
         EnemyChannel? receive drop GetToSafety?^
      loop
   then
   energy max-energy .5 * if
      do NeedFoodChannel? messages while
         NeedFoodChannel? receive drop drop Destination!
         syphon-max-rate negate syphon-rate!
         Destination position v- rect-to-polar syphon-angle!

syphon-distance!

      loop
   then
   Main& Jump
  1. end
April 24, 2006, at 10:36 PM by 72.24.29.85 -
Changed line 3 from:

(:source lang=cpp tabwidth=3 :)[@

to:

(:source lang=grobocode tabwidth=3 :)[@

April 17, 2006, at 10:55 PM by Tilendor -
Changed line 3 from:

(:source lang=cpp :)[@

to:

(:source lang=cpp tabwidth=3 :)[@

April 17, 2006, at 10:53 PM by Tilendor -
Changed line 3 from:

[@

to:

(:source lang=cpp :)[@

Changed line 15 from:

@]

to:

@]

April 17, 2006, at 12:25 AM by Tilendor -
Added lines 3-15:
Check-Comm:
	do
		2 messages
	while
		2 receive drop 2dup vPollen!
		position 2.4 in-range if
			time 20 + FeedPollen!
			return
		then
	loop
	return


Page last modified May 07, 2007, at 04:12 PM