This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Comments for Bouncing Bullets Tank AI Demo
Return to Bouncing Bullets Tank AI Demo
A new version of this scenario was uploaded on 2021-04-13 13:27:23 UTC
A new version of this scenario was uploaded on 2021-04-13 13:30:19 UTC
A new version of this scenario was uploaded on 2021-04-13 13:30:36 UTC
A new version of this scenario was uploaded on 2021-04-13 13:33:10 UTC
Roshan123
2021/4/13
Hmmmm... I dont remember but i think i have seen this Tank images before
danpost
2021/4/13
@Roshan123, yes ... bullets too, but not this size.
Projava99
2021/4/14
yes yes
Projava99
2021/4/14
/** * Write a description of class Bomb here. * * @author Projava99 */ public class level2 extends Bombs { private int Bombs=10; public level2() { super(600, 600, 1); makeBombs(); } /** * An example of a method - replace this comment with your own * */ private void prepare() { addObject(new boom(), 270, 355); } private void makeBombs() { for (int teller = 0;teller<Bombs;teller++) { for(int teller2 = 0;teller2<Bombs;teller2++) { if(teller % 2 ==0) { addobject (new Bombs(false), margin+(teller*27), margin+(teller2*27)); }else { addobject (new Bombs(true), margin+(teller*27), margin+(teller2*27)); } } } } }
Roshan123
2021/5/5
@danpost, is their anything written in "Ray" class. If yes then would to plz show it to me
Roshan123
2021/5/5
Got it!!! Actually it was below it. I thought its not their
Roshan123
2021/5/5
Which is wall and obstacles class. Just name its color or something else so that i can figure it out
danpost
2021/5/5
Roshan123, both Wall and Tank classes implement the Obstacle interface.
Roshan123
2021/5/17
How
Roshan123
2021/5/17
Did u added obstacle class
Roshan123
2021/5/17
addObj(new Obstacle(),0,0); Its giving me error that its an abstract and it cannot be initiated
danpost
2021/5/17
@Roshan123, Obstacle is not a class -- it is an interface which specific classes implement.
danpost
2021/5/17
@Roshan123, run scenario and click on 'About' button.
Roshan123
2021/5/17
In which class will i add that line
Roshan123
2021/5/17
I mean public interface obstacle {}
danpost
2021/5/17
@Roshan123, it is its own thing. Just replace a new class' complete codes with that one line.
Roshan123
2021/5/17
Import greenfoot.*; Public interface obstacle{} Class enum or interface required
Roshan123
2021/5/17
Ignore the capital letters
Roshan123
2021/5/17
Is it okay? interface Obstacle{} Its working
danpost
2021/5/17
@Roshan123, no imports required for this particular interface. Just the one line exactly as shown on 'About' page.
Roshan123
2021/5/18
Its shooting even if their is an obstacle infront of it
Roshan123
2021/5/18
@danpost, i made a discussion....plz help me out their
Roshan123
2021/5/18
Click enemy class and then plz check addedToWorld() method Under that u wrote addobj(ray,0,0) but if i m not wrong, i think it should be addobj(ray,getX(),getY())
Roshan123
2021/5/18
And also the same for setLocation
Roshan123
2021/5/18
I apologise for my mistake. Due to my carelessness i did a mistake which confused me a bit. Now its working
Roshan123
2021/5/18
Its was really helpfull for me. I hope the next "possible update" also includes more comments for “Ray„ class
X
2021/4/13
2021/4/13
2021/4/14
2021/4/14
2021/5/5
2021/5/5
2021/5/5
2021/5/5
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/17
2021/5/18
2021/5/18
2021/5/18
2021/5/18
2021/5/18
2021/5/18