Sample Code: Making Robots in Java (JRobot) 샘플 코드 : 로봇을 만드는 자바 (jrobot)
I talked about 내 얘기 JRobots, an extremely addictive Java game jrobots, 극도로 습관성 자바 게임 where you develop robots in java to fight against other JRobots in a monthly battle royale. 여기서는 자바에 맞서 싸울 로봇을 개발할 수있는 월별 배틀 로얄에서 다른 jrobots합니다. Today I will present you with a simple sample JRobot to encourage you to participate in this contest. 오늘은 간단한 샘플 jrobot을 소개 해 드릴 것은이 경연 대회에 참여할 것을 권해드립니다. It kicks the butt of all sample JRobots provided in the download bundle and even some veterans. 그것 그런지 엉덩이에서 제공되는 모든 샘플 jrobots도 일부 재향 군인의 번들을 다운로드합니다.
JRobots developers are hesitant to provide actual code because of two reasons; jrobots 개발자들은 두 가지 이유 때문에 망설 이는 실제 코드를 제공;
1. It will lead to proliferation of copy-cat JRobots with a different name which are just a waste of time for all. 이 연결되는 확산을 다른 이름으로 복사 - 고양이를 jrobots의 시간을 낭비하는 단지의 모든합니다.
2. 이. Nobody likes to reveal their secrets 좋아하는 사람 아무도 그들의 비밀을 누설 ![]()
I have considered them over the years. 지난 몇 년 동안 나는 그들로 간주합니다. I have come to the conclusion that the benefits of providing simple code for developers to begin with far outweighs other concerns. 나는 결론을 내렸는지의 혜택을 제공하는 개발자를위한 간단한 코드를 시작하는 다른 문제는 아주 중요합니다. So here is a simple JRobot which despite its simplicity can really kick butt of many JRobots. 그래서 여기는 간단한 jrobot을 단순화에도 불구하고 엉덩이가 많은 수가 쇼핑카트 jrobots합니다. It was initially released as CounterStrike. 그것은 당초 counterstrike로 출시합니다. However now the CounterStrike code is slightly more sophisticated. 그러나 이제는 코드가 약간 더 정교한 counterstrike합니다. So I am releasing this JRobot named Simple. 그래서 난이 jrobot 방출 이름을 간단합니다.
public class __Simple_ extends JJRobot { void main() { int distance, angle = 0; while (true) { while((distance = scan(angle, 1)) == 0) angle++; cannon(angle, distance); drive(angle, 100); } } } 공용 클래스 __simple_ 확장 jjrobot (무효 메인 () (int 거리, 각도 = 0;하는 동안 (진정한) (동안 ((거리 = 스캔 (각도, 1)) == 0) 각도 + +; 대포 (각도, 거리); 드라이브 ( 각도, 100);))) Download the source 의 소스를 다운로드 here 여기에 . 합니다.
You can see how easy it is to start coding JRobots. 볼 수있습니다 코딩을 시작하는 것이 얼마나 쉬운 jrobots합니다. What are you waiting for? 무엇을 망설이나?
See you in the arena. 경기장에서 보자. My JRobots are Bizarro, Janeway, Shrike and CounterStrike. 내 jrobots는스러운, 제인, shrike 및 counterstrike합니다.
Filed under 밑에 Headline News 헤드 라인 뉴스 , How To 하는 방법을 , Java Software 자바 소프트웨어 , Web 웹 , Web Services 웹 서비스 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |




































May 5th, 2006 at 11:55 am 2006년 5월 5일 11:55 있
necesito el codigo fuente del juego del gato en java … por favor atuda necesito 엘 codigo fuente 델 게임 델 가토 엉 자바… 뜨거워라 atuda