Re: problem with isTeammate()

fnl <[email protected]> Sat, 8 May 2021 08:08:54 -0700 (PDT)
Newsgroups gmane.comp.java.robocode
Message-ID <[email protected]>
Thank you for reporting this. I ran a test, and see that you are right that 
the isTeammate(e.getName()) seems to be broken.
I will have a look into getTeammates() as well, as you are right that these 
two issues are might be closely related.

I will follow up later, when I have a fix for it.

Cheers,
- Flemming

fredag den 7. maj 2021 kl. 16.36.13 UTC+2 skrev [email protected]:

> Hello!
>
> I am currently developing a team robot which main function will be to 
> protect its leader. However for this to work it has to identify which team 
> a robot belongs to as well as identify its own leader. Unfortunately 
> neither the isTeammate(e.getName()); , which I call in onScannedRobot, or 
> getTeammates() seems to work. The isTeammate() method always returns a 
> value false. When printing out the names of the retrieved bots through the 
> getTeammates function I get SittingDuck (1), SpinBot (1), SpinBot(2) etc. 
> but the bots on the battlefield might have different values in the 
> parentheses or nothing at all if it is the only bot of its kind on the 
> battlefield. Might that be the reason why isTeammate() won't work? I'm 
> currently running robocode v 1.3.9.7
>

-- 
You received this message because you are subscribed to the Google Groups "Robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/robocode/f06bd857-9897-45d8-a0c0-1ea739218fd3n%40googlegroups.com.