AdvancedRobot : Event and Execute

View: New views
6 Messages — Rating Filter:   Alert me  

AdvancedRobot : Event and Execute

by z4ppy_bbc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi !

I'm new on robocode and i'm trying to make my own bot... nice game for
learning java :]

So, i use advancedrobot for make more than one action / turn.

I'm confused by execute() and event can be set ..
When i use execute my robot move more speed than without with
customevent ... why ?



My -snipped- code is :

public void run(){

addCustomEvent(new RadarTurnCompleteCondition(this));
addCustomEvent(new MoveCompleteCondition(this));
myMove.getGravMove();
setTurnRadarLeft(360);

// if i use execute() (without addcustomEvent):
// the robot move many more speed than without while(true){execute};
// Why ?????
// I don't want use execute because i don't want wait all event finish
to start new action
while(true)
{
myMove.getGravMove();
setTurnRadarLeft(360);
execute();
}
}

public void onCustomEvent(CustomEvent e){
   
String sCondition;
sCondition = e.getCondition().getName();
   
if (sCondition == "robocode.MoveCompleteCondition"){
  myMove.getGravMove();
}
else if(sCondition == "robocode.RadarTurnCompleteCondition"){
  setTurnRadarLeft(360);
}
}




THX IF ANYONE IS ALIVE TO RESPOND :)




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Robocode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/Robocode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:Robocode-digest@...
    mailto:Robocode-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    Robocode-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


RE: AdvancedRobot : Event and Execute

by Jeremy-21 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



-----Original Message-----
From: Robocode@... [mailto:Robocode@...] On Behalf
Of z4ppy_bbc
Sent: Tuesday, October 31, 2006 10:15 AM
To: Robocode@...
Subject: [Robocode] AdvancedRobot : Event and Execute

Hi !

I'm new on robocode and i'm trying to make my own bot... nice game for
learning java :]

So, i use advancedrobot for make more than one action / turn.

I'm confused by execute() and event can be set ..
When i use execute my robot move more speed than without with
customevent ... why ?



My -snipped- code is :

public void run(){

addCustomEvent(new RadarTurnCompleteCondition(this));
addCustomEvent(new MoveCompleteCondition(this));
myMove.getGravMove();
setTurnRadarLeft(360);

// if i use execute() (without addcustomEvent):
// the robot move many more speed than without while(true){execute};
// Why ?????
// I don't want use execute because i don't want wait all event finish
to start new action
while(true)
{
myMove.getGravMove();
setTurnRadarLeft(360);
execute();
}
}

public void onCustomEvent(CustomEvent e){
   
String sCondition;
sCondition = e.getCondition().getName();
   
if (sCondition == "robocode.MoveCompleteCondition"){
  myMove.getGravMove();
}
else if(sCondition == "robocode.RadarTurnCompleteCondition"){
  setTurnRadarLeft(360);
}
}




THX IF ANYONE IS ALIVE TO RESPOND :)




 
Yahoo! Groups Links






--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.23/513 - Release Date: 11/2/2006



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Robocode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/Robocode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:Robocode-digest@...
    mailto:Robocode-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    Robocode-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Re: AdvancedRobot : Event and Execute

by z4ppy_bbc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

??

--- In Robocode@..., "Jeremy" <Jeremy@...> wrote:
>
>
>
> -----Original Message-----
> From: Robocode@... [mailto:Robocode@...] On
Behalf

> Of z4ppy_bbc
> Sent: Tuesday, October 31, 2006 10:15 AM
> To: Robocode@...
> Subject: [Robocode] AdvancedRobot : Event and Execute
>
> Hi !
>
> I'm new on robocode and i'm trying to make my own bot... nice game for
> learning java :]
>
> So, i use advancedrobot for make more than one action / turn.
>
> I'm confused by execute() and event can be set ..
> When i use execute my robot move more speed than without with
> customevent ... why ?
>
>
>
> My -snipped- code is :
>
> public void run(){
>
> addCustomEvent(new RadarTurnCompleteCondition(this));
> addCustomEvent(new MoveCompleteCondition(this));
> myMove.getGravMove();
> setTurnRadarLeft(360);
>
> // if i use execute() (without addcustomEvent):
> // the robot move many more speed than without while(true){execute};
> // Why ?????
> // I don't want use execute because i don't want wait all event finish
> to start new action
> while(true)
> {
> myMove.getGravMove();
> setTurnRadarLeft(360);
> execute();
> }
> }
>
> public void onCustomEvent(CustomEvent e){
>    
> String sCondition;
> sCondition = e.getCondition().getName();
>    
> if (sCondition == "robocode.MoveCompleteCondition"){
>   myMove.getGravMove();
> }
> else if(sCondition == "robocode.RadarTurnCompleteCondition"){
>   setTurnRadarLeft(360);
> }
> }
>
>
>
>
> THX IF ANYONE IS ALIVE TO RESPOND :)
>
>
>
>
>  
> Yahoo! Groups Links
>
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.13.23/513 - Release Date:
11/2/2006
>





Re: AdvancedRobot : Event and Execute

by seanpu1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like thr group is out to christmas :)


Re: AdvancedRobot : Event and Execute

by Gustavo Torreti :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We do see a quiter mood at the season :)

I wonder how a Santa´s Advanced Robot would be like...



Ho ho ho,
Gus Morpheus

merry Xmas to all
----------------------------------------------
When the Going Gets Tough, the Tough Get Going

Sun, 17 Dec 2006 15:10:00 -0000, "seanpu1" <seanpu1@...> escreveu:
> Looks like thr group is out to christmas :)


Re: AdvancedRobot : Event and Execute

by arf132004 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do you want to know what Santa's Robot will look like? It will be a
sleigh that will toss presents to the other robots, then the robots
will be so happy they will just crash on the spot just like kids on
Christmas. :)

------------------
-Viper

--- In Robocode@..., "Gustavo Torreti" <gustavo@...> wrote:

>
> We do see a quiter mood at the season :)
>
> I wonder how a Santa´s Advanced Robot would be like...
>
>
>
> Ho ho ho,
> Gus Morpheus
>
> merry Xmas to all
> ----------------------------------------------
> When the Going Gets Tough, the Tough Get Going
>
> Sun, 17 Dec 2006 15:10:00 -0000, "seanpu1" <seanpu1@...> escreveu:
> > Looks like thr group is out to christmas :)
>


LightInTheBox - Buy quality products at wholesale price!