Difference between revisions of "User talk:Urgood2"

From Robowiki
Jump to navigation Jump to search
Line 17: Line 17:
 
Thank you =) --[[User:Urgood2|-- Josh S]] 08:35, 24 April 2010 (UTC)
 
Thank you =) --[[User:Urgood2|-- Josh S]] 08:35, 24 April 2010 (UTC)
  
==urgood2==
+
==[[Urgood2]]==
 
*Newbie to Robocode
 
*Newbie to Robocode
  
Line 34: Line 34:
 
while (!field.contains(wallStickEnd =  
 
while (!field.contains(wallStickEnd =  
 
project(myLocation, angle, WALL_STICK))) {
 
project(myLocation, angle, WALL_STICK))) {
angle += .1 * direction;
+
angle += .1 * direction;
 
}  
 
}  
 
</pre>
 
</pre>
 
I was very frustrated about this, but I finally figured it out.. I replaced the <code>angle</code> argument with <code>getHeadingRadians() + angle</code>.  
 
I was very frustrated about this, but I finally figured it out.. I replaced the <code>angle</code> argument with <code>getHeadingRadians() + angle</code>.  
 
-[[User:Urgood2|-- Josh S]] 11:33, 26 April 2010 (UTC)
 
-[[User:Urgood2|-- Josh S]] 11:33, 26 April 2010 (UTC)

Revision as of 12:38, 26 April 2010

Welcome!

Hello, Urgood2, and welcome to RoboWiki! This place contains a wealth information about Robocode, from basic to more advanced. I hope you enjoy creating robots and being a robocoder!

If you are posting a comment on this wiki, please sign your messages using four tildes (--~~~~); this will automatically insert your username and the date stamp. If you are not familiar with MediaWiki, these links might help you out:

If you need help, check out the frequently asked questions or ask it on this page. Again, welcome!

—— RoboWiki Administrators

Welcome to the robowiki :) --Rednaxela 15:22, 23 April 2010 (UTC)

Thank you =) ---- Josh S 08:35, 24 April 2010 (UTC)

Urgood2

  • Newbie to Robocode

I am currently learning Java. I haven't made any "good" robots yet. -- Josh S 11:37, 26 April 2010 (UTC)

Most of us started without a good bot in our sleeves. My first entrance, which defeated 7 others bots at work in melee, ended up on spot 285 out of 300. And see where I stand today. Just set your personal goal within reach and build up from there. Defeating (most of) the samplebots is a good start. Happy robocoding! --GrubbmGait 17:57, 25 April 2010 (UTC)

Well, that's encouraging! I hope I can start to get a grip on things sometime in the future.. ---- Josh S 11:33, 26 April 2010 (UTC)

Finally got my WallAvoiderBot working. =) The angle adjusting part was testing for only heading 0...

 
//...
double angle = 0;
while (!field.contains(wallStickEnd = 
				project(myLocation, angle, WALL_STICK))) {
	angle += .1 * direction;
} 

I was very frustrated about this, but I finally figured it out.. I replaced the angle argument with getHeadingRadians() + angle. --- Josh S 11:33, 26 April 2010 (UTC)