Soldato
- Joined
- 15 Feb 2011
- Posts
- 10,234
- Location
- Slough
I'm working on a programming assignment for my evolutionary computing module and I'm getting very confused over a small part of it. We are programming robots for the game robocode, and I need to get the x and y co-ordinates of my opponents.
I know my robot's x and y co-ordinate; I know my robot's bearing (with the Y axis being north); I know the distance to my opponent and I know the angle I would need to turn to get to that robot. I'm sure there's an easy way to get my opponent's x and y co-ordinates from this information but what I thought would work is giving me totally wrong answers, so any help would be appreciated
I know my robot's x and y co-ordinate; I know my robot's bearing (with the Y axis being north); I know the distance to my opponent and I know the angle I would need to turn to get to that robot. I'm sure there's an easy way to get my opponent's x and y co-ordinates from this information but what I thought would work is giving me totally wrong answers, so any help would be appreciated