This site requires JavaScript, please enable it in your browser!
Greenfoot back
JesusJesus
JesusJesus wrote ...

2013/4/20

I need ideas and help

JesusJesus JesusJesus

2013/4/20

#
Hey, I am creating a Robot. The Robot is going to fight on a field against a Robot of anotherone. The rules are, that he can only move 2 and the Shooting isnt controlable. So i can only creat his movement. But i dont know how i should creat his movement. Now he is just moving randomly, but i think the most of the others are doing the same. Do you have an idea how i can have a good Chance to win against others? If you dont understand how it works, you can open this in greenfoot and see it by yourself. :) Thanks
danpost danpost

2013/4/20

#
Remove the code that creates his random movement and add code that will make him move depending on what keys are pressed (or follow the mouse??).
JesusJesus JesusJesus

2013/4/20

#
Hey thanks, but the Robot has to move by himself thats the Problem. Me and another guy creat a Robot, and then they have to fight. I Need a "way" or sth he can move....
danpost danpost

2013/4/20

#
Oh. Sorry, I misunderstood what you meant. Maybe hugging the edge (so that there are less ways for missles to approach you and less directions you need to shoot. Take some random number plus some, and move that many cycles; then turn toward the middle for a shot that way, turn back for a shot that way (you will probably end up shooting forward while moving forward). Repeat.
JesusJesus JesusJesus

2013/4/21

#
Thanks i will test it :)
You need to login to post a reply.