Sample Code: Making Robots in Java (JRobot) ������� ����: ����������� ������� � Java (JRobot)
I talked about � ������� � JRobots, an extremely addictive Java game JRobots, ����������� ���������� Java ���� 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 �������� Bizarro, Janeway, Shrike � CounterStrike.
Filed under ��������� � ������������ � Headline News Headline News , How To ��� , Java Software ����������� ����������� Java , Web ��� , Web Services 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 5 ��� 2006 ���� � 11:55 ����
necesito el codigo fuente del juego del gato en java … por favor atuda necesito �� codigo ������-����-juego-����-gato � java… ���������� atuda