diff --git a/Animation.class b/Animation.class new file mode 100644 index 0000000..31e371d Binary files /dev/null and b/Animation.class differ diff --git a/Animation.ctxt b/Animation.ctxt new file mode 100644 index 0000000..c8c00b7 --- /dev/null +++ b/Animation.ctxt @@ -0,0 +1,11 @@ +#BlueJ class context +comment0.target=Animation +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Animation\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=num +comment1.target=Animation(int) +comment2.params= +comment2.target=void\ act() +comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ Animation\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment3.params= +comment3.target=boolean\ end() +numComments=4 diff --git a/Animation.java b/Animation.java new file mode 100644 index 0000000..80e04a5 --- /dev/null +++ b/Animation.java @@ -0,0 +1,31 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Animation here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Animation extends Actor +{ + public int act_count = 0; + public int image_num = 0; + + public Animation(int num){ + act_count = 0; + image_num = num; + } + + /** + * Act - do whatever the Animation wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + // Add your action code here. + } + + public boolean end(){ + return act_count >= image_num; + } +} diff --git a/Barrier.class b/Barrier.class new file mode 100644 index 0000000..c242cbe Binary files /dev/null and b/Barrier.class differ diff --git a/Barrier.ctxt b/Barrier.ctxt new file mode 100644 index 0000000..9cf27e8 --- /dev/null +++ b/Barrier.ctxt @@ -0,0 +1,9 @@ +#BlueJ class context +comment0.target=Barrier +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Barrier\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=Barrier() +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Barrier\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment2.params= +comment2.target=void\ act() +numComments=3 diff --git a/Barrier.java b/Barrier.java new file mode 100644 index 0000000..bdad2a1 --- /dev/null +++ b/Barrier.java @@ -0,0 +1,23 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Barrier here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Barrier extends Actor +{ + /** + * Act - do whatever the Barrier wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public Barrier(){ + + } + + public void act() + { + // Add your action code here. + } +} diff --git a/Bullet.class b/Bullet.class new file mode 100644 index 0000000..6950887 Binary files /dev/null and b/Bullet.class differ diff --git a/Bullet.ctxt b/Bullet.ctxt new file mode 100644 index 0000000..460d00b --- /dev/null +++ b/Bullet.ctxt @@ -0,0 +1,19 @@ +#BlueJ class context +comment0.target=Bullet +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Bullet\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=init_pos\ init_speed\ direction +comment1.target=Bullet(Point,\ Point,\ double) +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Bullet\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment2.params= +comment2.target=void\ act() +comment3.params= +comment3.target=void\ move() +comment4.params=init_speed\ direction +comment4.target=void\ setSpeed(Point,\ double) +comment5.params= +comment5.target=boolean\ hitMover() +comment6.params= +comment6.target=boolean\ hitBarrier() +comment7.params= +comment7.target=void\ removeTouching() +numComments=8 diff --git a/Bullet.java b/Bullet.java new file mode 100644 index 0000000..c29cd1f --- /dev/null +++ b/Bullet.java @@ -0,0 +1,73 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import java.util.List; +/** + * Write a description of class Bullet here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Bullet extends Mover +{ + Point m_speed; + Point init_pos; + int act_count = 1; + /** + * Act - do whatever the Bullet wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public Bullet(Point init_pos, Point init_speed, double direction){ + super(6); + setLocation(init_pos); + setSpeed(init_speed, direction); + this.init_pos = init_pos; + act_count = 1; + } + + + + public void act() + { + move(); + act_count++; + // Add your action code here. + } + public void move(){ + Point displacement = new Point(m_speed); + displacement.scale(act_count); + displacement.y *= -1;//reverse y axis to match the stupid coordinate + setLocation(MyMath.add(init_pos, displacement)); + } + public void setSpeed(Point init_speed, double direction){ + + setRotation((int)MyMath.angleInRange(-direction)); + //direction = Math.toRadians(direction); + direction *= 0.0175; + m_speed = new Point(Math.cos(direction), Math.sin(direction)); + + m_speed.setLength(getMaxSpeed()); + m_speed = MyMath.add(init_speed, m_speed); + //setRotation((int)MyMath.angleInRange(-m_speed.getTheta())); + } + + + + public boolean hitMover(){ + return isTouching(Mover.class); + } + + public boolean hitBarrier(){ + return isTouching(Barrier.class); + } + + public void removeTouching(){ + List allTouched = getIntersectingObjects(TankBody.class); + for(TankBody t : allTouched){ + ((TankWorld)getWorld()).removeObject(t.m_turret); + ((TankWorld)getWorld()).removeObject(t); + } + removeTouching(Mover.class); + } + + + } + diff --git a/Explosion.class b/Explosion.class new file mode 100644 index 0000000..a349e7f Binary files /dev/null and b/Explosion.class differ diff --git a/Explosion.ctxt b/Explosion.ctxt new file mode 100644 index 0000000..3891a91 --- /dev/null +++ b/Explosion.ctxt @@ -0,0 +1,11 @@ +#BlueJ class context +comment0.target=Explosion +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Explosion\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=Explosion() +comment2.params= +comment2.target=void\ act() +comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ Explosion\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment3.params= +comment3.target=void\ playAnimation() +numComments=4 diff --git a/Explosion.java b/Explosion.java new file mode 100644 index 0000000..fbbdd2d --- /dev/null +++ b/Explosion.java @@ -0,0 +1,36 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Explosion here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Explosion extends Animation +{ + String image_path = "Explode_"; + private GreenfootImage image = new GreenfootImage(image_path + 0 + ".png"); + + public Explosion(){ + super(65); + } + /** + * Act - do whatever the Explosion wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + playAnimation(); + // Add your action code here. + } + + public void playAnimation(){ + if(act_count < image_num){ + image = new GreenfootImage(image_path + act_count + ".png"); + setImage(image); + } + act_count++; + } + + +} diff --git a/GetEricStupidJson.class b/GetEricStupidJson.class new file mode 100644 index 0000000..3149ab0 Binary files /dev/null and b/GetEricStupidJson.class differ diff --git a/GetEricStupidJson.ctxt b/GetEricStupidJson.ctxt new file mode 100644 index 0000000..c2b37f3 --- /dev/null +++ b/GetEricStupidJson.ctxt @@ -0,0 +1,6 @@ +#BlueJ class context +comment0.target=GetEricStupidJson +comment0.text=\r\n\ Write\ a\ description\ of\ class\ GetEricStupidJson\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=void\ main() +numComments=2 diff --git a/GetEricStupidJson.java b/GetEricStupidJson.java new file mode 100644 index 0000000..9b4444a --- /dev/null +++ b/GetEricStupidJson.java @@ -0,0 +1,40 @@ +import java.util.*; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import net.sf.json.JSONArray; +import net.sf.json.JSONObject; + + +/** + * Write a description of class GetEricStupidJson here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class GetEricStupidJson +{ + // instance variables - replace the example below with your own + public void main(){ + //JSONArray j = JSONArray.fromObject("[1,2]"); + // System.out.println(j.toString()); + /** + String url = "http://192.168.1.106:8080/test/test.json"; + InputStream is = new URL(url).openStream(); + try { + BufferedReader rd = new BufferedReader(new InputStreamReader(is,"utf-8")); //�?��?中文亂碼�?題 + StringBuilder sb = new StringBuilder(); + int cp; + while ((cp = rd.read()) != -1) { + sb.append((char) cp); + } + JSONObject json = JSONObject.fromObject(sb.toString()); + System.out.println(json.get("hello")); + } finally { + is.close(); + } + **/ + } + } diff --git a/Mover.class b/Mover.class new file mode 100644 index 0000000..b029e7b Binary files /dev/null and b/Mover.class differ diff --git a/Mover.ctxt b/Mover.ctxt new file mode 100644 index 0000000..5feb5da --- /dev/null +++ b/Mover.ctxt @@ -0,0 +1,27 @@ +#BlueJ class context +comment0.target=Mover +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Mover\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=Mover() +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Mover\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment10.params=speed +comment10.target=void\ setMaxSpeed(double) +comment11.params= +comment11.target=double\ getMaxSpeed() +comment2.params=max_speed +comment2.target=Mover(double) +comment3.params= +comment3.target=void\ act() +comment4.params=speed +comment4.target=void\ setSpeed(Point) +comment5.params= +comment5.target=Point\ getSpeed() +comment6.params= +comment6.target=void\ move() +comment7.params=pos +comment7.target=void\ setLocation(Point) +comment8.params= +comment8.target=Point\ getLocation() +comment9.params= +comment9.target=Point\ getLastPos() +numComments=12 diff --git a/Mover.java b/Mover.java new file mode 100644 index 0000000..6a9353c --- /dev/null +++ b/Mover.java @@ -0,0 +1,75 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Mover here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Mover extends Actor +{ + private Point speed = new Point(0, 0); + private double max_speed = 5; + private Point last_pos = new Point(0,0); + private Point pos; + /** + * Act - do whatever the Mover wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public Mover(){ + + } + + public Mover(double max_speed){ + this.max_speed = max_speed; + } + public void act() + { + move(); + // Add your action code here. + } + + public void setSpeed(Point speed){ + this.speed = speed; + if(speed.getLength() > max_speed) + this.speed.setLength(max_speed); + } + + public Point getSpeed(){ + return speed; + } + + public void move(){ + last_pos.x = getX(); + last_pos.y = getY(); + if(pos == null){ + pos = new Point(getX(), getY()); + } + else{ + pos.x += speed.x; + pos.y -= speed.y; + } + setLocation((int)pos.x, (int)pos.y); + } + + public void setLocation(Point pos){ + setLocation((int)pos.x, (int)pos.y); + } + + public Point getLocation(){ + return new Point(getX(), getY()); + } + + public Point getLastPos(){ + return last_pos; + } + + public void setMaxSpeed(double speed){ + max_speed = speed; + } + + public double getMaxSpeed(){ + return max_speed; + } + +} diff --git a/MyMath.class b/MyMath.class new file mode 100644 index 0000000..76307e8 Binary files /dev/null and b/MyMath.class differ diff --git a/MyMath.ctxt b/MyMath.ctxt new file mode 100644 index 0000000..6f6526f --- /dev/null +++ b/MyMath.ctxt @@ -0,0 +1,10 @@ +#BlueJ class context +comment0.target=MyMath +comment0.text=\r\n\ Write\ a\ description\ of\ class\ MyMath\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=a\ b +comment1.target=Point\ add(Point,\ Point) +comment2.params=a\ b +comment2.target=double\ dot(Point,\ Point) +comment3.params=angle +comment3.target=double\ angleInRange(double) +numComments=4 diff --git a/MyMath.java b/MyMath.java new file mode 100644 index 0000000..9eab104 --- /dev/null +++ b/MyMath.java @@ -0,0 +1,23 @@ +/** + * Write a description of class MyMath here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class MyMath +{ + public static Point add(Point a, Point b){ + return new Point(a.x + b.x, a.y + b.y); + } + + public static double dot(Point a, Point b){ + return a.x * b.x + a.y * b.y; + } + + public static double angleInRange(double angle){ + while(angle > 360) angle-=360; + while(angle < 0) angle += 360; + return angle; + } + +} diff --git a/Path.class b/Path.class new file mode 100644 index 0000000..5c360f4 Binary files /dev/null and b/Path.class differ diff --git a/Path.ctxt b/Path.ctxt new file mode 100644 index 0000000..6f6c4bf --- /dev/null +++ b/Path.ctxt @@ -0,0 +1,45 @@ +#BlueJ class context +comment0.target=Path +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Path\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=void\ act() +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Path\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment10.params= +comment10.target=Point\ getPosition() +comment11.params= +comment11.target=int\ getX() +comment12.params= +comment12.target=int\ getY() +comment13.params= +comment13.target=int\ getParent() +comment14.params=parent +comment14.target=void\ adopt(int) +comment15.params= +comment15.target=boolean\ isClosed() +comment16.params= +comment16.target=void\ close() +comment17.params= +comment17.target=int\ getG() +comment18.params=newG +comment18.target=void\ changeG(int) +comment19.params= +comment19.target=int\ getH() +comment2.params= +comment2.target=void\ changeImage() +comment20.params= +comment20.target=int\ getF() +comment3.params=position\ parent\ parentG\ thisG\ worldDestination +comment3.target=Path(Point,\ int,\ int,\ int,\ Point) +comment4.params=start_point\ destination +comment4.target=java.util.ArrayList\ findPath(Point,\ Point) +comment5.params=world_coordinate +comment5.target=Point\ transform_coordinate(Point) +comment6.params=path_coordinate +comment6.target=Point\ transform_coordinate_world(Point) +comment7.params= +comment7.target=Point\ to_world() +comment8.params=parent\ spot +comment8.target=boolean\ check_obstacle(Point,\ Point) +comment9.params=all_path\ parent\ cost\ spot +comment9.target=boolean\ check(java.util.ArrayList,\ int,\ int,\ Point) +numComments=21 diff --git a/Path.java b/Path.java new file mode 100644 index 0000000..73df8a3 --- /dev/null +++ b/Path.java @@ -0,0 +1,263 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import java.util.ArrayList; +/** + * Write a description of class Path here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Path extends Actor +{ + public static GreenfootImage transparentImage = new GreenfootImage("Path_0.png"); + private static GreenfootImage redImage = new GreenfootImage("Path_1.png"); + + + /** + * Act - do whatever the Path wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + //if(isTouching(TankBody.class) || isTouching(Barrier.class)) setImage(redImage); + //else setImage(transparentImage); + } + + public void changeImage(){ + GreenfootImage f = new GreenfootImage(g + " " + getF(), 15, Color.WHITE, Color.BLACK); + setImage(f); + } + + private Point position; // Position of square + private int parent; // Index of square that is before this one in the route + private boolean closed = false; // Has not been looked at + public int g; // Score to get to this position. 10s added for every vertical and horizontal move and 14s for every diagonal move since a diagonal move is a farther move + private int h; // Score estimate for how many vertical and horizontal moves, regardless of obstacles + + public Path(Point position, int parent, int parentG, int thisG, Point worldDestination) + { + this.position = position; // Position + this.parent = parent; // Parent + changeG(parentG + thisG); // Parent's score plus score took to get from there to here + Point destination = transform_coordinate(worldDestination); + h = (int)(Math.abs(position.x - destination.x) + Math.abs(position.y - destination.y)) * 10; // Vertical and horizontal spaces between here and destination + + } + + public static ArrayList findPath(Point start_point, Point destination){ + ArrayList all_path = new ArrayList(); + int parent = 0; + Path start_path = new Path(transform_coordinate(start_point), -1, 0, 0, destination); + start_path.g = 0; + // System.out.println(start_path.getF()); + all_path.add(start_path); + boolean target = false; + int steps = 200; + for(int c = 0; c < steps && !target; c++){ + Path curr_path = all_path.get(parent); + Point check_spot = new Point(0, -1); + //up + check_spot = new Point(0, -1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 10, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 10, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //down + check_spot = new Point(0, 1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 10, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 10, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //left + check_spot = new Point(-1, 0); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 10, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 10, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //right + check_spot = new Point(1, 0); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 10, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 10, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //up right + check_spot = new Point(1, -1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 14, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 14, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //up left + check_spot = new Point(-1, -1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 14, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 14, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //down right + check_spot = new Point(1, 1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 14, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 14, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + //down left + check_spot = new Point(-1, 1); + if(!check_obstacle(curr_path.position, check_spot)){ + if (!check(all_path, parent, 14, check_spot)){ // Check if already found this square and see if this route is better than one that the square is a part of + all_path.add(new Path(MyMath.add(curr_path.position, check_spot), parent, curr_path.getG(), 14, destination)); // Add the square, takes 10 points to move horizontally or vertically, and know how many points it has taken to get here + + } + } + for(Path p : all_path){ + // System.out.println(p.getPosition().toString() + " F: " + p.getF()); + } + //close current path + all_path.get(parent).close(); + //Choose the path in the open list that have the lowest f + int lowest = -1; // Index for square that has lowest score + for (int i = 0; i < all_path.size(); i++) // Get square that has lowest score + { + if (!all_path.get(i).isClosed()) // Make sure we have not already looked at + { + if (lowest == -1) // If havn't found one yet + lowest = i; // This lowest one found so far + else if (all_path.get(i).getF() < all_path.get(lowest).getF()) // Check to see if score of this square is the new lowest + lowest = i; // This lowest one found so far + } + } + // System.out.println("lowest: " + lowest + " pos: " + all_path.get(lowest).getPosition().toString()); + if (lowest == -1) // No possible path + { + return null; + } + parent = lowest; // Now looking at new lowest + for (int i = 0; i < all_path.size(); i++) // Loop all squares that have found + { + if (all_path.get(i).getPosition().equals(transform_coordinate(destination)) && all_path.get(i).isClosed()) // Check to see if found destination + { + parent = i; // Start at this square to chart back to beginning + target = true; // We have found the destination + } + } + + } + ArrayList final_path = new ArrayList(); + if(target){ + while(parent != -1){ + final_path.add(all_path.get(parent)); + parent = all_path.get(parent).getParent(); + } + } + + return final_path; + // return all_path; + } + + public static Point transform_coordinate(Point world_coordinate){ + Point new_point = new Point(world_coordinate); + new_point.x = (int)world_coordinate.x / transparentImage.getWidth(); + new_point.y = (int)world_coordinate.y / transparentImage.getHeight(); + return new_point; + } + + public static Point transform_coordinate_world(Point path_coordinate){ + Point new_point = new Point(path_coordinate); + new_point.x = (int)path_coordinate.x * transparentImage.getWidth() + transparentImage.getWidth()/2; + new_point.y = (int)path_coordinate.y * transparentImage.getHeight() + transparentImage.getHeight()/2; + return new_point; + } + + public Point to_world(){ + return transform_coordinate_world(this.position); + } + + //Check for obstacle and boundary + public static boolean check_obstacle(Point parent, Point spot){ + + try{ + if(TankWorld.Map[(int) (parent.y + spot.y)][(int)(parent.x)] != 1 && + TankWorld.Map[(int) (parent.y)][(int)(parent.x + spot.x)] != 1 && + TankWorld.Map[(int) (parent.y + spot.y)][(int)(parent.x + spot.x)] != 1) return false; + } + catch(Exception e){ + return true; + } + + return true; + } + private static boolean check(ArrayList all_path,int parent, int cost, Point spot) + { + boolean flag = false; + + + for (int i = 0; i < all_path.size(); i++) // Loop squares found + { + if (all_path.get(i).getPosition().equals(MyMath.add(all_path.get(parent).getPosition(), spot))) // Check if already have the square + { + flag = true; // Do have this square + if (!all_path.get(i).isClosed() && all_path.get(parent).getG() + cost < all_path.get(i).getG()) // Check if new route to square is better + { + all_path.get(i).adopt(parent); // Change square's parent + all_path.get(i).changeG(all_path.get(parent).getG() + cost); // Change square's score + } + } + } + return flag; // return if found that already have square + } + public Point getPosition() + { + return position; + } + public int getX() + { + return (int)position.x; + } + public int getY() + { + return (int)position.y; + } + public int getParent() + { + return parent; + } + public void adopt(int parent) + { + this.parent = parent; + } + public boolean isClosed() + { + return closed; + } + public void close() + { + closed = true; + } + public int getG() + { + return g; + } + public void changeG(int newG) + { + g = newG; + if(TankWorld.Map[(int)position.y][(int)position.x] != 0) g += 500; + } + public int getH() + { + return h; + } + + public int getF(){ + return g+h; + } +} \ No newline at end of file diff --git a/Point.class b/Point.class new file mode 100644 index 0000000..a6a1a8e Binary files /dev/null and b/Point.class differ diff --git a/Point.ctxt b/Point.ctxt new file mode 100644 index 0000000..f44bceb --- /dev/null +++ b/Point.ctxt @@ -0,0 +1,21 @@ +#BlueJ class context +comment0.target=Point +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Point\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=x\ y +comment1.target=Point(double,\ double) +comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ Point\r\n +comment2.params=p +comment2.target=Point(Point) +comment3.params=c +comment3.target=Point\ scale(double) +comment4.params=length +comment4.target=Point\ setLength(double) +comment5.params= +comment5.target=double\ getLength() +comment6.params= +comment6.target=double\ getTheta() +comment7.params= +comment7.target=java.lang.String\ toString() +comment8.params=p +comment8.target=boolean\ equals(Point) +numComments=9 diff --git a/Point.java b/Point.java new file mode 100644 index 0000000..0f3e01a --- /dev/null +++ b/Point.java @@ -0,0 +1,62 @@ +/** + * Write a description of class Point here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Point +{ + // instance variables - replace the example below with your own + public double x; + public double y; + + /** + * Constructor for objects of class Point + */ + public Point(double x, double y) + { + this.x = x; + this.y = y; + } + + public Point(Point p){ + this.x = p.x; + this.y = p.y; + } + + public Point scale(double c){ + x *= c; + y *= c; + return new Point(x, y); + } + + public Point setLength(double length){ + if(length == 0 || getLength() == 0){ + x = 0; + y = 0; + + } + else{ + scale(length / getLength()); + } + return new Point(x, y); + } + + public double getLength(){ + return Math.hypot(x, y); + } + + public double getTheta(){ + return MyMath.angleInRange(Math.toDegrees(Math.atan2(y, x))); + } + + public String toString(){ + return "x: " + x + " y:" + y; + } + + public boolean equals(Point p){ + return this.x == p.x && this.y == p.y; + } + + +} diff --git a/README.TXT b/README.TXT new file mode 100644 index 0000000..2bea2dd --- /dev/null +++ b/README.TXT @@ -0,0 +1,12 @@ +------------------------------------------------------------------------ +This is the project README file. Here, you should describe your project. +Tell the reader (someone who does not know anything about this project) +all he/she needs to know. The comments should usually include at least: +------------------------------------------------------------------------ + +PROJECT TITLE: +PURPOSE OF PROJECT: +VERSION or DATE: +HOW TO START THIS PROJECT: +AUTHORS: +USER INSTRUCTIONS: diff --git a/TankBody.class b/TankBody.class new file mode 100644 index 0000000..be5d72b Binary files /dev/null and b/TankBody.class differ diff --git a/TankBody.ctxt b/TankBody.ctxt new file mode 100644 index 0000000..3b827d3 --- /dev/null +++ b/TankBody.ctxt @@ -0,0 +1,23 @@ +#BlueJ class context +comment0.target=TankBody +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Tank\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=me +comment1.target=TankBody(boolean) +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Tank\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment2.params= +comment2.target=void\ act() +comment3.params= +comment3.target=void\ playerControl() +comment4.params= +comment4.target=void\ enemyControl() +comment5.params= +comment5.target=void\ keyBoardControl() +comment6.params= +comment6.target=void\ tankMove() +comment7.params= +comment7.target=boolean\ testMove() +comment8.params=p +comment8.target=void\ moveToPoint(Point) +comment9.params=p\ speed +comment9.target=void\ moveToPoint(Point,\ double) +numComments=10 diff --git a/TankBody.java b/TankBody.java new file mode 100644 index 0000000..bf07a1c --- /dev/null +++ b/TankBody.java @@ -0,0 +1,196 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import java.util.List; +import java.util.ArrayList; +/** + * Write a description of class Tank here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class TankBody extends Mover +{ + public TankTurret m_turret; + private GreenfootImage MyBodyImage = new GreenfootImage("M_Tank.png"); + private GreenfootImage EnemyBodyImage = new GreenfootImage("E_Tank.png"); + public boolean me = false; + private Point destination; + private ArrayList m_path; + private static Point player_pos; + + /** + * Act - do whatever the Tank wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public TankBody(boolean me){ + super(3); + + m_turret = new TankTurret(this, me); + if(me) { + setImage(MyBodyImage); + } + else { + setImage(EnemyBodyImage); + setMaxSpeed(4); + } + + this.me = me; + } + public void act() + { + // Add your action code here. + + if(me){ + playerControl(); + player_pos = new Point(getX(), getY()); + } + else{ + enemyControl(); + } + + } + + public void playerControl(){ + keyBoardControl(); + if(Greenfoot.isKeyDown("x")){ + destination = new Point(500, 700); + List rp = getWorld().getObjects(Path.class); + for(Path p : rp){ + getWorld().removeObject(p); + } + m_path = Path.findPath(new Point(getX(), getY()), destination); + for(Path p : m_path){ + getWorld().addObject(p,(int)p.to_world().x, (int)p.to_world().y); + p.changeImage(); + //System.out.println(p.getPosition().toString()); + } + Path dest = new Path(Path.transform_coordinate(destination), 0, 0, 0, destination); + getWorld().addObject(dest,(int)dest.to_world().x, (int)dest.to_world().y); + dest.changeImage(); + //System.out.println(m_path.size()); + } + + } + + public void enemyControl(){ + double to_destination = 0; + double refresh_rate = 10; + if(to_destination > 15) refresh_rate = (int)to_destination * 3; + //find path to player + if(TankWorld.timer % refresh_rate == 1){ + m_path = Path.findPath(new Point(getX(), getY()), player_pos); + // if(m_path != null){ + // List rp = getWorld().getObjects(Path.class); + // for(Path p : rp){ + // getWorld().removeObject(p); + // } + + // for(Path p : m_path){ + // getWorld().addObject(p,(int)p.to_world().x, (int)p.to_world().y); + // p.changeImage(); + // //System.out.println(p.getPosition().toString()); + // } + // } + } + if(m_path != null){ + + for(int i = 1; i < m_path.size(); i++){ + Point p = m_path.get(i).getPosition(); + + if(Path.transform_coordinate(new Point(getX(), getY())).equals(p)){ + + double ratio = 0.7; + destination = MyMath.add(m_path.get(i-1).to_world().scale(ratio), m_path.get(i).to_world().scale(1-ratio)); + to_destination = i; + } + } + } + // System.out.println(destination.toString()); + // moveToPoint(player_pos); + if(destination != null){ + if(to_destination > 2 || true) + moveToPoint(destination, to_destination / 5); + // System.out.println(getSpeed().getLength()); + } + } + + + + public void keyBoardControl(){ + Point m_speed = new Point(0, 0); + double basic_speed = 10; + + + if(Greenfoot.isKeyDown("w")) { + m_speed.y += basic_speed; + } + if(Greenfoot.isKeyDown("a")) { + m_speed.x -= basic_speed; + } + if(Greenfoot.isKeyDown("s")) { + m_speed.y -= basic_speed; + } + if(Greenfoot.isKeyDown("d")) { + m_speed.x += basic_speed; + } + setSpeed(m_speed); + tankMove(); + } + + public void tankMove(){ + Point m_speed = getSpeed(); + if(!testMove()){ + setSpeed(new Point(m_speed.x, 0)); + if(!testMove()){ + setSpeed(new Point(0, m_speed.y)); + testMove(); + } + } + // //check collide + // if(isTouching(Barrier.class) || isTouching(TankBody.class)) { + // setLocation(getLastPos()); + // setSpeed(new Point(getSpeed().x, 0)); + // move(); + // } + // if(isTouching(Barrier.class) || isTouching(TankBody.class)) { + // setLocation(getLastPos()); + // setSpeed(new Point(0, getSpeed().y)); + // move(); + // } + // if(isTouching(Barrier.class) || isTouching(TankBody.class)) { + // setLocation(getLastPos()); + // } + } + + public boolean testMove(){ + if(getSpeed().getLength() != 0){ + double r = MyMath.angleInRange(Math.toDegrees(Math.atan2(getSpeed().y, getSpeed().x))); + setRotation(360 - (int)r); + } + //if(getSpeed().getLength() < 2) setSpeed(getSpeed().setLength(2)); + if(getOneObjectAtOffset((int)getSpeed().x * 15, -(int)getSpeed().y * 15 , Barrier.class) == null && + getOneObjectAtOffset((int)getSpeed().x * 15, -(int)getSpeed().y * 15 , TankBody.class) == null){ + move(); + return true; + } + + // if(isTouching(Barrier.class) || isTouching(TankBody.class)) { + // setLocation(getLastPos()); + // return false; + // } + return false; + } + + public void moveToPoint(Point p){ + Point relative_pos = new Point(p.x - getX(), -p.y + getY()); + relative_pos.setLength(getMaxSpeed()); + setSpeed(relative_pos); + tankMove(); + } + public void moveToPoint(Point p, double speed){ + Point relative_pos = new Point(p.x - getX(), -p.y + getY()); + relative_pos.setLength(speed); + setSpeed(relative_pos); + tankMove(); + } + +} diff --git a/TankTurret.class b/TankTurret.class new file mode 100644 index 0000000..d2eb243 Binary files /dev/null and b/TankTurret.class differ diff --git a/TankTurret.ctxt b/TankTurret.ctxt new file mode 100644 index 0000000..30546cb --- /dev/null +++ b/TankTurret.ctxt @@ -0,0 +1,23 @@ +#BlueJ class context +comment0.target=TankTurret +comment0.text=\r\n\ Write\ a\ description\ of\ class\ TankTurret\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=tankBody\ me +comment1.target=TankTurret(TankBody,\ boolean) +comment2.params= +comment2.target=void\ act() +comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ TankTurret\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +comment3.params= +comment3.target=void\ playerControl() +comment4.params= +comment4.target=void\ enemyControl() +comment5.params= +comment5.target=void\ followBody() +comment6.params= +comment6.target=void\ followMouse() +comment7.params= +comment7.target=boolean\ aimMe() +comment8.params= +comment8.target=void\ shootBullet() +comment9.params=enemyPos +comment9.target=boolean\ willShootAlly(Point) +numComments=10 diff --git a/TankTurret.java b/TankTurret.java new file mode 100644 index 0000000..21bbbab --- /dev/null +++ b/TankTurret.java @@ -0,0 +1,117 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import java.util.List; +/** + * Write a description of class TankTurret here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class TankTurret extends Mover +{ + TankBody m_tankBody; + boolean me; + int reload_complete = 100; + int reload = 0; + private GreenfootImage MyTurretImage = new GreenfootImage("M_Turret.png"); + private GreenfootImage EnemyTurretImage = new GreenfootImage("E_Turret.png"); + public TankTurret(TankBody tankBody, boolean me){ + m_tankBody = tankBody; + this.me = me; + if(me){ + setImage(MyTurretImage); + reload_complete = 50; + } + else { + setImage(EnemyTurretImage); + reload_complete = 70; + reload = Greenfoot.getRandomNumber(15); + } + } + /** + * Act - do whatever the TankTurret wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + followBody(); + reload++; + if(me) playerControl(); + else enemyControl(); + // Add your action code here. + } + + void playerControl(){ + followMouse(); + if(Greenfoot.mouseClicked(null))shootBullet(); + } + void enemyControl(){ + if(aimMe()){ + shootBullet(); + } + } + + void followBody(){ + setSpeed(m_tankBody.getSpeed()); + setLocation(m_tankBody.getX(), m_tankBody.getY()); + } + + public void followMouse(){ + try{ + MouseInfo mouse = Greenfoot.getMouseInfo(); + double angle = Math.atan2(mouse.getY() - getY(), mouse.getX() - getX()); + angle = Math.toDegrees(angle); + setRotation((int)MyMath.angleInRange(angle)); + } + catch(Exception e){} + } + + public boolean aimMe(){ + List movers = getObjectsInRange(10000, TankBody.class); + for (TankBody m : movers){ + if(m != null){ + if(m.me == true){ + double angle = new Point(m.getX() - getX(), m.getY() - getY()).getTheta(); + setRotation((int)MyMath.angleInRange(angle)); + if(willShootAlly(new Point(m.getX(), m.getY()))) return false; + return true; + } + } + } + return false; + } + + public void shootBullet(){ + if(reload > reload_complete){ + reload = 0; + int angle_bias = 5 - Greenfoot.getRandomNumber(10); + int shoot_angle = getRotation() + angle_bias; + double degree = Math.toRadians(shoot_angle); + Point offset = new Point(Math.cos(degree), Math.sin(degree)); + offset.scale(41); + ((TankWorld)getWorld()).spawnBullet(MyMath.add(getLocation(), offset), getSpeed(), MyMath.angleInRange(-(double)shoot_angle)); + } + } + + boolean willShootAlly(Point enemyPos){ + //compute the trajectory equation + double a = enemyPos.y - getY(); + double b = enemyPos.x - getX(); + double c = -a * getX() - b * getY(); + //System.out.println(a + " " + b + " " + c); + List allys = getObjectsInRange(10000, TankBody.class); + for (TankBody ally : allys){ + if(ally != null){ + if(ally.me == false && ally != m_tankBody){ + double dis_to_trajectory = Math.abs(a * ally.getX() + b * ally.getY() + c) / Math.hypot(a, b); + //System.out.println(dis_to_trajectory); + if(dis_to_trajectory < 150) + if(MyMath.dot(new Point(ally.getX() - getX(), ally.getY() - getY()), + new Point(ally.getX() - enemyPos.x, ally.getY() - enemyPos.y)) < 0) + return true; + + } + } + } + return false; + } +} diff --git a/TankWorld.class b/TankWorld.class new file mode 100644 index 0000000..2b8217a Binary files /dev/null and b/TankWorld.class differ diff --git a/TankWorld.ctxt b/TankWorld.ctxt new file mode 100644 index 0000000..f3c6a0a --- /dev/null +++ b/TankWorld.ctxt @@ -0,0 +1,25 @@ +#BlueJ class context +comment0.target=TankWorld +comment0.text=\r\n\ Write\ a\ description\ of\ class\ MyWorld\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=TankWorld() +comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ MyWorld.\r\n\ \r\n +comment10.params=p +comment10.target=boolean\ hi(Path) +comment2.params=me\ x\ y +comment2.target=void\ createTank(boolean,\ int,\ int) +comment3.params= +comment3.target=void\ generateMap() +comment4.params= +comment4.target=void\ updateMap() +comment5.params= +comment5.target=void\ act() +comment6.params= +comment6.target=void\ checkBulletCollision() +comment7.params=init_pos\ init_speed\ direction +comment7.target=void\ spawnBullet(Point,\ Point,\ double) +comment8.params=b +comment8.target=void\ removeBullet(Bullet) +comment9.params= +comment9.target=void\ removeAnimation() +numComments=11 diff --git a/TankWorld.java b/TankWorld.java new file mode 100644 index 0000000..469a674 --- /dev/null +++ b/TankWorld.java @@ -0,0 +1,212 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import java.util.List; +/** + * Write a description of class MyWorld here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class TankWorld extends World +{ + // int enemyNum = 3; + public static double timer = 0; + public static int[][] Map; + int[][] emptyMap = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + }; + /** + * Constructor for objects of class MyWorld. + * + */ + public TankWorld() + { + // Create a new world with 600x400 cells with a cell size of 1x1 pixels. + super(1000, 800, 1); + createTank(true, getWidth()/2, getHeight()/2); + + // for (int i = 0; i < enemyNum; i++){ + // int x = Greenfoot.getRandomNumber(getWidth()); + // int y = Greenfoot.getRandomNumber(getHeight()); + // while (Math.abs(x - getWidth()/2) < 200 && Math.abs(y - getHeight()/2) < 200) { + // x = Greenfoot.getRandomNumber(getWidth()); + // y = Greenfoot.getRandomNumber(getHeight()); + // } + // createTank(false, x, y); + // } + generateMap(); + //generatePath(); + } + + public void createTank(boolean me, int x, int y){ + TankBody m = new TankBody(me); + addObject(m, x, y); + addObject(m.m_turret, x, y); + } + + public void generateMap(){ + // 1 => barrier + // 11 => enemy tank + // int[][] map = { + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + // }; + int[][] map1 = { + {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + { 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + { 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0}, + { 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0}, + { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + { 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + { 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0}, + { 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0}, + { 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0}, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, + { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0}, + { 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0}, + { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11}, + }; + Map = map1; + for(int i = 0; i < 16; i++){ + for(int j = 0; j < 20; j++){ + int n = Map[i][j]; + Point p = Path.transform_coordinate_world(new Point(j, i)); + if(n == 1){ + + addObject(new Wall(), (int)p.x, (int)p.y); + } + if(n == 11){ + createTank(false, (int)p.x, (int)p.y); + + } + } + } + // for(int i = 0; i < 10; i++){ + // int x = Greenfoot.getRandomNumber(getWidth()); + // int y = Greenfoot.getRandomNumber(getHeight()); + // addObject(new Wall(), x, y); + // } + } + + public void updateMap(){ + //reset map + for(int i = 0; i < 16; i++){ + for(int j = 0; j < 20; j++){ + Map[i][j] = 0; + } + } + List tanks = getObjects(TankBody.class); + for (TankBody t : tanks){ + if(t.me == false){ + Point p = Path.transform_coordinate(new Point(t.getX(), t.getY())); + Map[(int)p.y][(int)p.x] = 11; + System.out.println(p.toString()); + } + } + List walls = getObjects(Wall.class); + for (Wall w : walls){ + Point p = Path.transform_coordinate(new Point(w.getX(), w.getY())); + Map[(int)p.y][(int)p.x] = 1; + } + + + // List rp = getObjects(Path.class); + // for(Path p : rp){ + // removeObject(p); + // } + // for(int i = 0; i < 16; i++){ + // for(int j = 0; j < 20; j++){ + // Path p = new Path(new Point(j, i), 0, Map[i][j], 0, new Point(0, 0)); + // addObject(p,(int)p.to_world().x, (int)p.to_world().y); + // p.changeImage(); + // } + // } + + + + } + + public void act(){ + checkBulletCollision(); + removeAnimation(); + updateMap(); + timer++; + } + + void checkBulletCollision(){ + List all_bullet = getObjects(Bullet.class); + for (Bullet b : all_bullet){ + //at edge + try{ + if(b.isAtEdge()) { + + removeBullet(b); + } + else if(b.hitMover()){ + b.removeTouching(); + removeBullet(b); + } + else if(b.hitBarrier()){ + removeBullet(b); + } + } + catch(Exception e){} + + } + } + + public void spawnBullet(Point init_pos, Point init_speed, double direction){ + Bullet b = new Bullet(init_pos, init_speed, direction); + addObject(b, (int)init_pos.x, (int)init_pos.y); + } + + public void removeBullet(Bullet b){ + addObject(new Explosion(), b.getX(), b.getY()); + removeObject(b); + } + + public void removeAnimation(){ + List animations = getObjects(Animation.class); + for(Animation a : animations){ + if(a.end()) removeObject(a); + } + } + + public static boolean hi(Path p){ + // getObjectsAt(0,0,Actor.class); + return false; + } + + +} diff --git a/Wall.class b/Wall.class new file mode 100644 index 0000000..28bdde7 Binary files /dev/null and b/Wall.class differ diff --git a/Wall.ctxt b/Wall.ctxt new file mode 100644 index 0000000..d732475 --- /dev/null +++ b/Wall.ctxt @@ -0,0 +1,7 @@ +#BlueJ class context +comment0.target=Wall +comment0.text=\r\n\ Write\ a\ description\ of\ class\ Wall\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params= +comment1.target=void\ act() +comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Wall\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n +numComments=2 diff --git a/Wall.java b/Wall.java new file mode 100644 index 0000000..98013f1 --- /dev/null +++ b/Wall.java @@ -0,0 +1,19 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Wall here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Wall extends Barrier +{ + /** + * Act - do whatever the Wall wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + // Add your action code here. + } +} diff --git a/doc/Bullet.html b/doc/Bullet.html new file mode 100644 index 0000000..c229aa4 --- /dev/null +++ b/doc/Bullet.html @@ -0,0 +1,227 @@ + + + + + +Bullet + + + + + + + + + +
+
+

Class Bullet

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • greenfoot.Actor
    • +
    • +
        +
      • Mover
      • +
      • +
          +
        • Bullet
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Bullet
    +extends Mover
    +
    Write a description of class Bullet here.
    +
    +
    Version:
    +
    (a version number or a date)
    +
    Author:
    +
    (your name)
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Bullet​(double direction) +
      Act - do whatever the Bullet wants to do.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidact() 
      voidhitWall() 
      voidsetSpeed​(double direction) 
      +
        +
      • + + +

        Methods inherited from class Mover

        +move, setSpeed
      • +
      +
        +
      • + + +

        Methods inherited from class greenfoot.Actor

        +addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowards
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Bullet

        +
        public Bullet​(double direction)
        +
        Act - do whatever the Bullet wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        act

        +
        public void act()
        +
        +
        Overrides:
        +
        act in class Mover
        +
        +
      • +
      + + + +
        +
      • +

        setSpeed

        +
        public void setSpeed​(double direction)
        +
      • +
      + + + +
        +
      • +

        hitWall

        +
        public void hitWall()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + diff --git a/doc/TankWorld.html b/doc/TankWorld.html new file mode 100644 index 0000000..99f2150 --- /dev/null +++ b/doc/TankWorld.html @@ -0,0 +1,250 @@ + + + + + +TankWorld + + + + + + + + + +
+
+

Class TankWorld

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • greenfoot.World
    • +
    • +
        +
      • TankWorld
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    public class TankWorld
    +extends greenfoot.World
    +
    Write a description of class MyWorld here.
    +
    +
    Version:
    +
    (a version number or a date)
    +
    Author:
    +
    (your name)
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      TankWorld() +
      Constructor for objects of class MyWorld.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidact() 
      voidcreateTank​(boolean me, + int x, + int y) 
      voidremoveAnimation() 
      voidremoveBullet​(Bullet b) 
      voidspawnBullet​(Point init_pos, + Point init_speed, + double direction) 
      +
        +
      • + + +

        Methods inherited from class greenfoot.World

        +addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TankWorld

        +
        public TankWorld()
        +
        Constructor for objects of class MyWorld.
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createTank

        +
        public void createTank​(boolean me,
        +                       int x,
        +                       int y)
        +
      • +
      + + + +
        +
      • +

        act

        +
        public void act()
        +
        +
        Overrides:
        +
        act in class greenfoot.World
        +
        +
      • +
      + + + +
        +
      • +

        spawnBullet

        +
        public void spawnBullet​(Point init_pos,
        +                        Point init_speed,
        +                        double direction)
        +
      • +
      + + + +
        +
      • +

        removeBullet

        +
        public void removeBullet​(Bullet b)
        +
      • +
      + + + +
        +
      • +

        removeAnimation

        +
        public void removeAnimation()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + diff --git a/doc/allclasses.html b/doc/allclasses.html new file mode 100644 index 0000000..d953067 --- /dev/null +++ b/doc/allclasses.html @@ -0,0 +1,20 @@ + + + + + +All Classes + + + + + + +

All Classes

+
+ +
+ + diff --git a/doc/constant-values.html b/doc/constant-values.html new file mode 100644 index 0000000..3529ee9 --- /dev/null +++ b/doc/constant-values.html @@ -0,0 +1,35 @@ + + + + + +Constant Field Values + + + + + + + + +
+
+

Constant Field Values

+
+

Contents

+
+
+
+ + diff --git a/doc/element-list b/doc/element-list new file mode 100644 index 0000000..147af06 --- /dev/null +++ b/doc/element-list @@ -0,0 +1 @@ +unnamed package diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..3ef9254 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,23 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + +
+ +

TankWorld.html

+
+ + diff --git a/doc/logfile.txt b/doc/logfile.txt new file mode 100644 index 0000000..e0ebc61 --- /dev/null +++ b/doc/logfile.txt @@ -0,0 +1,42 @@ +Class documentation +<---- javadoc command: ----> +C:\Program Files\Greenfoot\jdk\bin\javadoc.exe +-author +-version +-nodeprecated +-protected +-Xdoclint:none +-noindex +-notree +-nohelp +-nonavbar +-source +11 +-classpath +C:\Program Files\Greenfoot\lib\extensions\greenfoot.jar;C:\Program Files\Greenfoot\lib\bluejcore.jar;C:\Program Files\Greenfoot\lib\bluejeditor.jar;C:\Program Files\Greenfoot\lib\bluejext.jar;C:\Program Files\Greenfoot\lib\junit-4.11.jar;C:\Program Files\Greenfoot\lib\hamcrest-core-1.3.jar;C:\Program Files\Greenfoot\lib\bluej.jar;C:\Program Files\Greenfoot\lib\classgraph-4.2.6.jar;C:\Program Files\Greenfoot\lib\diffutils-1.2.1.jar;C:\Program Files\Greenfoot\lib\commons-logging-api-1.1.2.jar;C:\Program Files\Greenfoot\lib\jl1.0.1.jar;C:\Program Files\Greenfoot\lib\opencsv-2.3.jar;C:\Program Files\Greenfoot\lib\xom-1.2.9.jar;C:\Program Files\Greenfoot\lib\lang-stride.jar;C:\Program Files\Greenfoot\lib\nsmenufx-2.1.4.jar;C:\Program Files\Greenfoot\lib\richtextfx-fat-0.9.0.jar;C:\Program Files\Greenfoot\lib\guava-17.0.jar;C:\Program Files\Greenfoot\lib\httpclient-4.1.1.jar;C:\Program Files\Greenfoot\lib\httpcore-4.1.jar;C:\Program Files\Greenfoot\lib\httpmime-4.1.1.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.base.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.controls.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.fxml.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.graphics.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.media.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.properties.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.swing.jar;C:\Program Files\Greenfoot\lib\javafx\lib\javafx.web.jar;C:\Users\JiaYu\Desktop\json-lib-2.4-jdk15.jar;C:\Program Files\Greenfoot\lib\userlib\json.jar;D:\Programming\GreenFoot\TankGame +-d +D:\Programming\GreenFoot\TankGame\doc +-encoding +UTF-8 +-charset +UTF-8 +D:\Programming\GreenFoot\TankGame\TankWorld.java +<---- end of javadoc command ----> +Loading source file D:\Programming\GreenFoot\TankGame\TankWorld.java... +Constructing Javadoc information... +warning: unknown enum constant Tag.Any + reason: class file for threadchecker.Tag not found +warning: unknown enum constant Tag.Any +warning: unknown enum constant Tag.Any +warning: unknown enum constant Tag.Any +Standard Doclet version 11.0.2 +Building tree for all the packages and classes... +Generating D:\Programming\GreenFoot\TankGame\doc\TankWorld.html... +Generating D:\Programming\GreenFoot\TankGame\doc\package-summary.html... +Generating D:\Programming\GreenFoot\TankGame\doc\constant-values.html... +Building index for all the packages and classes... +Building index for all classes... +Generating D:\Programming\GreenFoot\TankGame\doc\allclasses.html... +Generating D:\Programming\GreenFoot\TankGame\doc\allclasses.html... +Generating D:\Programming\GreenFoot\TankGame\doc\index.html... +4 warnings diff --git a/doc/package-summary.html b/doc/package-summary.html new file mode 100644 index 0000000..da12cac --- /dev/null +++ b/doc/package-summary.html @@ -0,0 +1,53 @@ + + + + + +<Unnamed> + + + + + + + + +
+
+

Package <Unnamed>

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    TankWorld +
    Write a description of class MyWorld here.
    +
    +
  • +
+
+
+ + diff --git a/doc/script.js b/doc/script.js new file mode 100644 index 0000000..0eaaf53 --- /dev/null +++ b/doc/script.js @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'jquery/jszip/dist/jszip.js'); + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js'); + if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 || + window.navigator.userAgent.indexOf('Edge/') > 0) { + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js'); + } + createElem(doc, tag, 'search.js'); + + $.get(pathtoroot + "module-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { + var zip = new JSZip(data); + zip.load(data); + moduleSearchIndex = JSON.parse(zip.file("module-search-index.json").asText()); + }); + }); + $.get(pathtoroot + "package-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { + var zip = new JSZip(data); + zip.load(data); + packageSearchIndex = JSON.parse(zip.file("package-search-index.json").asText()); + }); + }); + $.get(pathtoroot + "type-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { + var zip = new JSZip(data); + zip.load(data); + typeSearchIndex = JSON.parse(zip.file("type-search-index.json").asText()); + }); + }); + $.get(pathtoroot + "member-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { + var zip = new JSZip(data); + zip.load(data); + memberSearchIndex = JSON.parse(zip.file("member-search-index.json").asText()); + }); + }); + $.get(pathtoroot + "tag-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { + var zip = new JSZip(data); + zip.load(data); + tagSearchIndex = JSON.parse(zip.file("tag-search-index.json").asText()); + }); + }); + if (!moduleSearchIndex) { + createElem(doc, tag, 'module-search-index.js'); + } + if (!packageSearchIndex) { + createElem(doc, tag, 'package-search-index.js'); + } + if (!typeSearchIndex) { + createElem(doc, tag, 'type-search-index.js'); + } + if (!memberSearchIndex) { + createElem(doc, tag, 'member-search-index.js'); + } + if (!tagSearchIndex) { + createElem(doc, tag, 'tag-search-index.js'); + } + $(window).resize(function() { + $('.navPadding').css('padding-top', $('.fixedNav').css("height")); + }); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(type) { + count = 0; + for (var key in data) { + var row = document.getElementById(key); + if ((data[key] & type) !== 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) { + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} + +function updateModuleFrame(pFrame, cFrame) { + top.packageFrame.location = pFrame; + top.classFrame.location = cFrame; +} diff --git a/doc/stylesheet.css b/doc/stylesheet.css new file mode 100644 index 0000000..fa24676 --- /dev/null +++ b/doc/stylesheet.css @@ -0,0 +1,906 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +a[name]:before, a[name]:target, a[id]:before, a[id]:target { + content:""; + display:inline-block; + position:relative; + padding-top:129px; + margin-top:-129px; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} + +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.navPadding { + padding-top: 107px; +} +.fixedNav { + position:fixed; + width:100%; + z-index:999; + background-color:#ffffff; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch { + float:right; + margin:0 0 0 0; + padding:0; +} +ul.navListSearch li { + list-style:none; + float:right; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch li label { + position:relative; + right:-16px; +} +ul.subNavList li { + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Styles for page header and footer. + */ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexNav { + position:relative; + font-size:12px; + background-color:#dee3e9; +} +.indexNav ul { + margin-top:0; + padding:5px; +} +.indexNav ul li { + display:inline; + list-style-type:none; + padding-right:10px; + text-transform:uppercase; +} +.indexNav h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* + * Styles for page layout containers. + */ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer, +.allClassesContainer, .allPackagesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* + * Styles for tables. + */ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary, +.requiresSummary, .packagesSummary, .providesSummary, .usesSummary { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary, .requiresSummary, .packagesSummary, .providesSummary, .usesSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption, +.requiresSummary caption, .packagesSummary caption, .providesSummary caption, .usesSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.constantsSummary caption a:link, .deprecatedSummary caption a:link, +.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link, +.usesSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover, +.usesSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.constantsSummary caption a:active, .deprecatedSummary caption a:active, +.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active, +.usesSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.constantsSummary caption a:visited, .deprecatedSummary caption a:visited, +.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited, +.usesSummary caption a:visited { + color:#FFFFFF; +} +.useSummary caption a:link, .useSummary caption a:hover, .useSummary caption a:active, +.useSummary caption a:visited { + color:#1f389c; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span, +.requiresSummary caption span, .packagesSummary caption span, .providesSummary caption span, +.usesSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span, .packagesSummary caption span.activeTableTab span, +.overviewSummary caption span.activeTableTab span, .typeSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span, .packagesSummary caption span.tableTab span, +.overviewSummary caption span.tableTab span, .typeSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab, +.packagesSummary caption span.tableTab, .packagesSummary caption span.activeTableTab, +.overviewSummary caption span.tableTab, .overviewSummary caption span.activeTableTab, +.typeSummary caption span.tableTab, .typeSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd, +.requiresSummary .tabEnd, .packagesSummary .tabEnd, .providesSummary .tabEnd, .usesSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd, .packagesSummary .activeTableTab .tabEnd, +.overviewSummary .activeTableTab .tabEnd, .typeSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd, .packagesSummary .tableTab .tabEnd, +.overviewSummary .tableTab .tabEnd, .typeSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; +} +.rowColor th, .altColor th { + font-weight:normal; +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td, +.requiresSummary td, .packagesSummary td, .providesSummary td, .usesSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .useSummary th, +.constantsSummary th, .packagesSummary th, td.colFirst, td.colSecond, td.colLast, .useSummary td, +.constantsSummary td { + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .constantsSummary th, +.packagesSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + font-size:13px; +} +td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colDeprecatedItemName, th.colLast { + font-size:13px; +} +.constantsSummary th, .packagesSummary th { + font-size:13px; +} +.providesSummary th.colFirst, .providesSummary th.colLast, .providesSummary td.colFirst, +.providesSummary td.colLast { + white-space:normal; + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.requiresSummary td.colFirst, .requiresSummary th.colFirst, +.packagesSummary td.colFirst, .packagesSummary td.colSecond, .packagesSummary th.colFirst, .packagesSummary th, +.usesSummary td.colFirst, .usesSummary th.colFirst, +.providesSummary td.colFirst, .providesSummary th.colFirst, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colSecond, .memberSummary th.colSecond, .memberSummary th.colConstructorName, +.typeSummary td.colFirst, .typeSummary th.colFirst { + vertical-align:top; +} +.packagesSummary th.colLast, .packagesSummary td.colLast { + white-space:normal; +} +td.colFirst a:link, td.colFirst a:visited, +td.colSecond a:link, td.colSecond a:visited, +th.colFirst a:link, th.colFirst a:visited, +th.colSecond a:link, th.colSecond a:visited, +th.colConstructorName a:link, th.colConstructorName a:visited, +th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited, +.constantValuesContainer td a:link, .constantValuesContainer td a:visited, +.allClassesContainer td a:link, .allClassesContainer td a:visited, +.allPackagesContainer td a:link, .allPackagesContainer td a:visited { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor, .altColor th { + background-color:#FFFFFF; +} +.rowColor, .rowColor th { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +td.colLast div { + padding-top:0px; +} +td.colLast a { + padding-bottom:3px; +} +/* + * Styles for formatting effect. + */ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink, +.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType, +.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel, +.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} +.deprecationBlock { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} +div.contentContainer ul.blockList li.blockList h2 { + padding-bottom:0px; +} +/* + * Styles for IFRAME. + */ +.mainContainer { + margin:0 auto; + padding:0; + height:100%; + width:100%; + position:fixed; + top:0; + left:0; +} +.leftContainer { + height:100%; + position:fixed; + width:320px; +} +.leftTop { + position:relative; + float:left; + width:315px; + top:0; + left:0; + height:30%; + border-right:6px solid #ccc; + border-bottom:6px solid #ccc; +} +.leftBottom { + position:relative; + float:left; + width:315px; + bottom:0; + left:0; + height:70%; + border-right:6px solid #ccc; + border-top:1px solid #000; +} +.rightContainer { + position:absolute; + left:320px; + top:0; + bottom:0; + height:100%; + right:0; + border-left:1px solid #000; +} +.rightIframe { + margin:0; + padding:0; + height:100%; + right:30px; + width:100%; + overflow:visible; + margin-bottom:30px; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.resultItem { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.resultHighlight { + font-weight:bold; +} +#search { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; +} +#reset { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:17px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.searchTagDescResult { + font-style:italic; + font-size:11px; +} +.searchTagHolderResult { + font-style:italic; + font-size:12px; +} +.searchTagResult:before, .searchTagResult:target { + color:red; +} +.moduleGraph span { + display:none; + position:absolute; +} +.moduleGraph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.methodSignature { + white-space:normal; +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} diff --git a/images/Bullet-removebg-preview.png b/images/Bullet-removebg-preview.png new file mode 100644 index 0000000..cb8a646 Binary files /dev/null and b/images/Bullet-removebg-preview.png differ diff --git a/images/Bullet.png b/images/Bullet.png new file mode 100644 index 0000000..7aa3357 Binary files /dev/null and b/images/Bullet.png differ diff --git a/images/E_Tank.png b/images/E_Tank.png new file mode 100644 index 0000000..0ac3b51 Binary files /dev/null and b/images/E_Tank.png differ diff --git a/images/E_Turret.png b/images/E_Turret.png new file mode 100644 index 0000000..e941102 Binary files /dev/null and b/images/E_Turret.png differ diff --git a/images/Enemy.png b/images/Enemy.png new file mode 100644 index 0000000..1985951 Binary files /dev/null and b/images/Enemy.png differ diff --git a/images/Explode.png b/images/Explode.png new file mode 100644 index 0000000..0b043e6 Binary files /dev/null and b/images/Explode.png differ diff --git a/images/ExplodeEffect/Explode_0.png b/images/ExplodeEffect/Explode_0.png new file mode 100644 index 0000000..20e5e99 Binary files /dev/null and b/images/ExplodeEffect/Explode_0.png differ diff --git a/images/ExplodeEffect/Explode_1.png b/images/ExplodeEffect/Explode_1.png new file mode 100644 index 0000000..9e53996 Binary files /dev/null and b/images/ExplodeEffect/Explode_1.png differ diff --git a/images/ExplodeEffect/Explode_10.png b/images/ExplodeEffect/Explode_10.png new file mode 100644 index 0000000..10e2298 Binary files /dev/null and b/images/ExplodeEffect/Explode_10.png differ diff --git a/images/ExplodeEffect/Explode_11.png b/images/ExplodeEffect/Explode_11.png new file mode 100644 index 0000000..aaedd6b Binary files /dev/null and b/images/ExplodeEffect/Explode_11.png differ diff --git a/images/ExplodeEffect/Explode_12.png b/images/ExplodeEffect/Explode_12.png new file mode 100644 index 0000000..456920d Binary files /dev/null and b/images/ExplodeEffect/Explode_12.png differ diff --git a/images/ExplodeEffect/Explode_13.png b/images/ExplodeEffect/Explode_13.png new file mode 100644 index 0000000..4a13e2e Binary files /dev/null and b/images/ExplodeEffect/Explode_13.png differ diff --git a/images/ExplodeEffect/Explode_14.png b/images/ExplodeEffect/Explode_14.png new file mode 100644 index 0000000..e1fd820 Binary files /dev/null and b/images/ExplodeEffect/Explode_14.png differ diff --git a/images/ExplodeEffect/Explode_15.png b/images/ExplodeEffect/Explode_15.png new file mode 100644 index 0000000..f8ceedc Binary files /dev/null and b/images/ExplodeEffect/Explode_15.png differ diff --git a/images/ExplodeEffect/Explode_16.png b/images/ExplodeEffect/Explode_16.png new file mode 100644 index 0000000..11c6b2a Binary files /dev/null and b/images/ExplodeEffect/Explode_16.png differ diff --git a/images/ExplodeEffect/Explode_17.png b/images/ExplodeEffect/Explode_17.png new file mode 100644 index 0000000..ac19172 Binary files /dev/null and b/images/ExplodeEffect/Explode_17.png differ diff --git a/images/ExplodeEffect/Explode_18.png b/images/ExplodeEffect/Explode_18.png new file mode 100644 index 0000000..9782ae2 Binary files /dev/null and b/images/ExplodeEffect/Explode_18.png differ diff --git a/images/ExplodeEffect/Explode_19.png b/images/ExplodeEffect/Explode_19.png new file mode 100644 index 0000000..eb17372 Binary files /dev/null and b/images/ExplodeEffect/Explode_19.png differ diff --git a/images/ExplodeEffect/Explode_2.png b/images/ExplodeEffect/Explode_2.png new file mode 100644 index 0000000..376c7ed Binary files /dev/null and b/images/ExplodeEffect/Explode_2.png differ diff --git a/images/ExplodeEffect/Explode_20.png b/images/ExplodeEffect/Explode_20.png new file mode 100644 index 0000000..3666fa1 Binary files /dev/null and b/images/ExplodeEffect/Explode_20.png differ diff --git a/images/ExplodeEffect/Explode_21.png b/images/ExplodeEffect/Explode_21.png new file mode 100644 index 0000000..46be52a Binary files /dev/null and b/images/ExplodeEffect/Explode_21.png differ diff --git a/images/ExplodeEffect/Explode_22.png b/images/ExplodeEffect/Explode_22.png new file mode 100644 index 0000000..4db6a60 Binary files /dev/null and b/images/ExplodeEffect/Explode_22.png differ diff --git a/images/ExplodeEffect/Explode_23.png b/images/ExplodeEffect/Explode_23.png new file mode 100644 index 0000000..78c002d Binary files /dev/null and b/images/ExplodeEffect/Explode_23.png differ diff --git a/images/ExplodeEffect/Explode_24.png b/images/ExplodeEffect/Explode_24.png new file mode 100644 index 0000000..fb14d8a Binary files /dev/null and b/images/ExplodeEffect/Explode_24.png differ diff --git a/images/ExplodeEffect/Explode_25.png b/images/ExplodeEffect/Explode_25.png new file mode 100644 index 0000000..c6def22 Binary files /dev/null and b/images/ExplodeEffect/Explode_25.png differ diff --git a/images/ExplodeEffect/Explode_26.png b/images/ExplodeEffect/Explode_26.png new file mode 100644 index 0000000..a98b4ec Binary files /dev/null and b/images/ExplodeEffect/Explode_26.png differ diff --git a/images/ExplodeEffect/Explode_27.png b/images/ExplodeEffect/Explode_27.png new file mode 100644 index 0000000..06365f7 Binary files /dev/null and b/images/ExplodeEffect/Explode_27.png differ diff --git a/images/ExplodeEffect/Explode_28.png b/images/ExplodeEffect/Explode_28.png new file mode 100644 index 0000000..68e5fef Binary files /dev/null and b/images/ExplodeEffect/Explode_28.png differ diff --git a/images/ExplodeEffect/Explode_29.png b/images/ExplodeEffect/Explode_29.png new file mode 100644 index 0000000..f65318a Binary files /dev/null and b/images/ExplodeEffect/Explode_29.png differ diff --git a/images/ExplodeEffect/Explode_3.png b/images/ExplodeEffect/Explode_3.png new file mode 100644 index 0000000..6df43b8 Binary files /dev/null and b/images/ExplodeEffect/Explode_3.png differ diff --git a/images/ExplodeEffect/Explode_30.png b/images/ExplodeEffect/Explode_30.png new file mode 100644 index 0000000..0071624 Binary files /dev/null and b/images/ExplodeEffect/Explode_30.png differ diff --git a/images/ExplodeEffect/Explode_31.png b/images/ExplodeEffect/Explode_31.png new file mode 100644 index 0000000..e019b06 Binary files /dev/null and b/images/ExplodeEffect/Explode_31.png differ diff --git a/images/ExplodeEffect/Explode_32.png b/images/ExplodeEffect/Explode_32.png new file mode 100644 index 0000000..f0cdb00 Binary files /dev/null and b/images/ExplodeEffect/Explode_32.png differ diff --git a/images/ExplodeEffect/Explode_33.png b/images/ExplodeEffect/Explode_33.png new file mode 100644 index 0000000..a43e7d0 Binary files /dev/null and b/images/ExplodeEffect/Explode_33.png differ diff --git a/images/ExplodeEffect/Explode_34.png b/images/ExplodeEffect/Explode_34.png new file mode 100644 index 0000000..ddb6b79 Binary files /dev/null and b/images/ExplodeEffect/Explode_34.png differ diff --git a/images/ExplodeEffect/Explode_35.png b/images/ExplodeEffect/Explode_35.png new file mode 100644 index 0000000..ff17153 Binary files /dev/null and b/images/ExplodeEffect/Explode_35.png differ diff --git a/images/ExplodeEffect/Explode_36.png b/images/ExplodeEffect/Explode_36.png new file mode 100644 index 0000000..3835aaa Binary files /dev/null and b/images/ExplodeEffect/Explode_36.png differ diff --git a/images/ExplodeEffect/Explode_37.png b/images/ExplodeEffect/Explode_37.png new file mode 100644 index 0000000..a817dea Binary files /dev/null and b/images/ExplodeEffect/Explode_37.png differ diff --git a/images/ExplodeEffect/Explode_38.png b/images/ExplodeEffect/Explode_38.png new file mode 100644 index 0000000..80aa1b5 Binary files /dev/null and b/images/ExplodeEffect/Explode_38.png differ diff --git a/images/ExplodeEffect/Explode_39.png b/images/ExplodeEffect/Explode_39.png new file mode 100644 index 0000000..bebfa06 Binary files /dev/null and b/images/ExplodeEffect/Explode_39.png differ diff --git a/images/ExplodeEffect/Explode_4.png b/images/ExplodeEffect/Explode_4.png new file mode 100644 index 0000000..782b729 Binary files /dev/null and b/images/ExplodeEffect/Explode_4.png differ diff --git a/images/ExplodeEffect/Explode_40.png b/images/ExplodeEffect/Explode_40.png new file mode 100644 index 0000000..c65df1b Binary files /dev/null and b/images/ExplodeEffect/Explode_40.png differ diff --git a/images/ExplodeEffect/Explode_41.png b/images/ExplodeEffect/Explode_41.png new file mode 100644 index 0000000..62c7b53 Binary files /dev/null and b/images/ExplodeEffect/Explode_41.png differ diff --git a/images/ExplodeEffect/Explode_42.png b/images/ExplodeEffect/Explode_42.png new file mode 100644 index 0000000..0e13f86 Binary files /dev/null and b/images/ExplodeEffect/Explode_42.png differ diff --git a/images/ExplodeEffect/Explode_43.png b/images/ExplodeEffect/Explode_43.png new file mode 100644 index 0000000..d737bf8 Binary files /dev/null and b/images/ExplodeEffect/Explode_43.png differ diff --git a/images/ExplodeEffect/Explode_44.png b/images/ExplodeEffect/Explode_44.png new file mode 100644 index 0000000..3024ef5 Binary files /dev/null and b/images/ExplodeEffect/Explode_44.png differ diff --git a/images/ExplodeEffect/Explode_45.png b/images/ExplodeEffect/Explode_45.png new file mode 100644 index 0000000..de5d904 Binary files /dev/null and b/images/ExplodeEffect/Explode_45.png differ diff --git a/images/ExplodeEffect/Explode_46.png b/images/ExplodeEffect/Explode_46.png new file mode 100644 index 0000000..27f100d Binary files /dev/null and b/images/ExplodeEffect/Explode_46.png differ diff --git a/images/ExplodeEffect/Explode_47.png b/images/ExplodeEffect/Explode_47.png new file mode 100644 index 0000000..cd4b614 Binary files /dev/null and b/images/ExplodeEffect/Explode_47.png differ diff --git a/images/ExplodeEffect/Explode_48.png b/images/ExplodeEffect/Explode_48.png new file mode 100644 index 0000000..4ab21f3 Binary files /dev/null and b/images/ExplodeEffect/Explode_48.png differ diff --git a/images/ExplodeEffect/Explode_49.png b/images/ExplodeEffect/Explode_49.png new file mode 100644 index 0000000..80ad854 Binary files /dev/null and b/images/ExplodeEffect/Explode_49.png differ diff --git a/images/ExplodeEffect/Explode_5.png b/images/ExplodeEffect/Explode_5.png new file mode 100644 index 0000000..9c04dc7 Binary files /dev/null and b/images/ExplodeEffect/Explode_5.png differ diff --git a/images/ExplodeEffect/Explode_50.png b/images/ExplodeEffect/Explode_50.png new file mode 100644 index 0000000..4211fe2 Binary files /dev/null and b/images/ExplodeEffect/Explode_50.png differ diff --git a/images/ExplodeEffect/Explode_51.png b/images/ExplodeEffect/Explode_51.png new file mode 100644 index 0000000..6badaf5 Binary files /dev/null and b/images/ExplodeEffect/Explode_51.png differ diff --git a/images/ExplodeEffect/Explode_52.png b/images/ExplodeEffect/Explode_52.png new file mode 100644 index 0000000..14c5cc1 Binary files /dev/null and b/images/ExplodeEffect/Explode_52.png differ diff --git a/images/ExplodeEffect/Explode_53.png b/images/ExplodeEffect/Explode_53.png new file mode 100644 index 0000000..eca3f4b Binary files /dev/null and b/images/ExplodeEffect/Explode_53.png differ diff --git a/images/ExplodeEffect/Explode_54.png b/images/ExplodeEffect/Explode_54.png new file mode 100644 index 0000000..d4aafde Binary files /dev/null and b/images/ExplodeEffect/Explode_54.png differ diff --git a/images/ExplodeEffect/Explode_55.png b/images/ExplodeEffect/Explode_55.png new file mode 100644 index 0000000..c58b9d7 Binary files /dev/null and b/images/ExplodeEffect/Explode_55.png differ diff --git a/images/ExplodeEffect/Explode_56.png b/images/ExplodeEffect/Explode_56.png new file mode 100644 index 0000000..7120fd1 Binary files /dev/null and b/images/ExplodeEffect/Explode_56.png differ diff --git a/images/ExplodeEffect/Explode_57.png b/images/ExplodeEffect/Explode_57.png new file mode 100644 index 0000000..e36d969 Binary files /dev/null and b/images/ExplodeEffect/Explode_57.png differ diff --git a/images/ExplodeEffect/Explode_58.png b/images/ExplodeEffect/Explode_58.png new file mode 100644 index 0000000..596d447 Binary files /dev/null and b/images/ExplodeEffect/Explode_58.png differ diff --git a/images/ExplodeEffect/Explode_59.png b/images/ExplodeEffect/Explode_59.png new file mode 100644 index 0000000..1083e8d Binary files /dev/null and b/images/ExplodeEffect/Explode_59.png differ diff --git a/images/ExplodeEffect/Explode_6.png b/images/ExplodeEffect/Explode_6.png new file mode 100644 index 0000000..37e36fd Binary files /dev/null and b/images/ExplodeEffect/Explode_6.png differ diff --git a/images/ExplodeEffect/Explode_60.png b/images/ExplodeEffect/Explode_60.png new file mode 100644 index 0000000..ef06e50 Binary files /dev/null and b/images/ExplodeEffect/Explode_60.png differ diff --git a/images/ExplodeEffect/Explode_61.png b/images/ExplodeEffect/Explode_61.png new file mode 100644 index 0000000..4ed4497 Binary files /dev/null and b/images/ExplodeEffect/Explode_61.png differ diff --git a/images/ExplodeEffect/Explode_62.png b/images/ExplodeEffect/Explode_62.png new file mode 100644 index 0000000..45bc201 Binary files /dev/null and b/images/ExplodeEffect/Explode_62.png differ diff --git a/images/ExplodeEffect/Explode_63.png b/images/ExplodeEffect/Explode_63.png new file mode 100644 index 0000000..589d831 Binary files /dev/null and b/images/ExplodeEffect/Explode_63.png differ diff --git a/images/ExplodeEffect/Explode_64.png b/images/ExplodeEffect/Explode_64.png new file mode 100644 index 0000000..5a2665a Binary files /dev/null and b/images/ExplodeEffect/Explode_64.png differ diff --git a/images/ExplodeEffect/Explode_7.png b/images/ExplodeEffect/Explode_7.png new file mode 100644 index 0000000..993ebfb Binary files /dev/null and b/images/ExplodeEffect/Explode_7.png differ diff --git a/images/ExplodeEffect/Explode_8.png b/images/ExplodeEffect/Explode_8.png new file mode 100644 index 0000000..b730c31 Binary files /dev/null and b/images/ExplodeEffect/Explode_8.png differ diff --git a/images/ExplodeEffect/Explode_9.png b/images/ExplodeEffect/Explode_9.png new file mode 100644 index 0000000..1d8a499 Binary files /dev/null and b/images/ExplodeEffect/Explode_9.png differ diff --git a/images/Explode_0.png b/images/Explode_0.png new file mode 100644 index 0000000..20e5e99 Binary files /dev/null and b/images/Explode_0.png differ diff --git a/images/Explode_1.png b/images/Explode_1.png new file mode 100644 index 0000000..9e53996 Binary files /dev/null and b/images/Explode_1.png differ diff --git a/images/Explode_10.png b/images/Explode_10.png new file mode 100644 index 0000000..10e2298 Binary files /dev/null and b/images/Explode_10.png differ diff --git a/images/Explode_11.png b/images/Explode_11.png new file mode 100644 index 0000000..aaedd6b Binary files /dev/null and b/images/Explode_11.png differ diff --git a/images/Explode_12.png b/images/Explode_12.png new file mode 100644 index 0000000..456920d Binary files /dev/null and b/images/Explode_12.png differ diff --git a/images/Explode_13.png b/images/Explode_13.png new file mode 100644 index 0000000..4a13e2e Binary files /dev/null and b/images/Explode_13.png differ diff --git a/images/Explode_14.png b/images/Explode_14.png new file mode 100644 index 0000000..e1fd820 Binary files /dev/null and b/images/Explode_14.png differ diff --git a/images/Explode_15.png b/images/Explode_15.png new file mode 100644 index 0000000..f8ceedc Binary files /dev/null and b/images/Explode_15.png differ diff --git a/images/Explode_16.png b/images/Explode_16.png new file mode 100644 index 0000000..11c6b2a Binary files /dev/null and b/images/Explode_16.png differ diff --git a/images/Explode_17.png b/images/Explode_17.png new file mode 100644 index 0000000..ac19172 Binary files /dev/null and b/images/Explode_17.png differ diff --git a/images/Explode_18.png b/images/Explode_18.png new file mode 100644 index 0000000..9782ae2 Binary files /dev/null and b/images/Explode_18.png differ diff --git a/images/Explode_19.png b/images/Explode_19.png new file mode 100644 index 0000000..eb17372 Binary files /dev/null and b/images/Explode_19.png differ diff --git a/images/Explode_2.png b/images/Explode_2.png new file mode 100644 index 0000000..376c7ed Binary files /dev/null and b/images/Explode_2.png differ diff --git a/images/Explode_20.png b/images/Explode_20.png new file mode 100644 index 0000000..3666fa1 Binary files /dev/null and b/images/Explode_20.png differ diff --git a/images/Explode_21.png b/images/Explode_21.png new file mode 100644 index 0000000..46be52a Binary files /dev/null and b/images/Explode_21.png differ diff --git a/images/Explode_22.png b/images/Explode_22.png new file mode 100644 index 0000000..4db6a60 Binary files /dev/null and b/images/Explode_22.png differ diff --git a/images/Explode_23.png b/images/Explode_23.png new file mode 100644 index 0000000..78c002d Binary files /dev/null and b/images/Explode_23.png differ diff --git a/images/Explode_24.png b/images/Explode_24.png new file mode 100644 index 0000000..fb14d8a Binary files /dev/null and b/images/Explode_24.png differ diff --git a/images/Explode_25.png b/images/Explode_25.png new file mode 100644 index 0000000..c6def22 Binary files /dev/null and b/images/Explode_25.png differ diff --git a/images/Explode_26.png b/images/Explode_26.png new file mode 100644 index 0000000..a98b4ec Binary files /dev/null and b/images/Explode_26.png differ diff --git a/images/Explode_27.png b/images/Explode_27.png new file mode 100644 index 0000000..06365f7 Binary files /dev/null and b/images/Explode_27.png differ diff --git a/images/Explode_28.png b/images/Explode_28.png new file mode 100644 index 0000000..68e5fef Binary files /dev/null and b/images/Explode_28.png differ diff --git a/images/Explode_29.png b/images/Explode_29.png new file mode 100644 index 0000000..f65318a Binary files /dev/null and b/images/Explode_29.png differ diff --git a/images/Explode_3.png b/images/Explode_3.png new file mode 100644 index 0000000..6df43b8 Binary files /dev/null and b/images/Explode_3.png differ diff --git a/images/Explode_30.png b/images/Explode_30.png new file mode 100644 index 0000000..0071624 Binary files /dev/null and b/images/Explode_30.png differ diff --git a/images/Explode_31.png b/images/Explode_31.png new file mode 100644 index 0000000..e019b06 Binary files /dev/null and b/images/Explode_31.png differ diff --git a/images/Explode_32.png b/images/Explode_32.png new file mode 100644 index 0000000..f0cdb00 Binary files /dev/null and b/images/Explode_32.png differ diff --git a/images/Explode_33.png b/images/Explode_33.png new file mode 100644 index 0000000..a43e7d0 Binary files /dev/null and b/images/Explode_33.png differ diff --git a/images/Explode_34.png b/images/Explode_34.png new file mode 100644 index 0000000..ddb6b79 Binary files /dev/null and b/images/Explode_34.png differ diff --git a/images/Explode_35.png b/images/Explode_35.png new file mode 100644 index 0000000..ff17153 Binary files /dev/null and b/images/Explode_35.png differ diff --git a/images/Explode_36.png b/images/Explode_36.png new file mode 100644 index 0000000..3835aaa Binary files /dev/null and b/images/Explode_36.png differ diff --git a/images/Explode_37.png b/images/Explode_37.png new file mode 100644 index 0000000..a817dea Binary files /dev/null and b/images/Explode_37.png differ diff --git a/images/Explode_38.png b/images/Explode_38.png new file mode 100644 index 0000000..80aa1b5 Binary files /dev/null and b/images/Explode_38.png differ diff --git a/images/Explode_39.png b/images/Explode_39.png new file mode 100644 index 0000000..bebfa06 Binary files /dev/null and b/images/Explode_39.png differ diff --git a/images/Explode_4.png b/images/Explode_4.png new file mode 100644 index 0000000..782b729 Binary files /dev/null and b/images/Explode_4.png differ diff --git a/images/Explode_40.png b/images/Explode_40.png new file mode 100644 index 0000000..c65df1b Binary files /dev/null and b/images/Explode_40.png differ diff --git a/images/Explode_41.png b/images/Explode_41.png new file mode 100644 index 0000000..62c7b53 Binary files /dev/null and b/images/Explode_41.png differ diff --git a/images/Explode_42.png b/images/Explode_42.png new file mode 100644 index 0000000..0e13f86 Binary files /dev/null and b/images/Explode_42.png differ diff --git a/images/Explode_43.png b/images/Explode_43.png new file mode 100644 index 0000000..d737bf8 Binary files /dev/null and b/images/Explode_43.png differ diff --git a/images/Explode_44.png b/images/Explode_44.png new file mode 100644 index 0000000..3024ef5 Binary files /dev/null and b/images/Explode_44.png differ diff --git a/images/Explode_45.png b/images/Explode_45.png new file mode 100644 index 0000000..de5d904 Binary files /dev/null and b/images/Explode_45.png differ diff --git a/images/Explode_46.png b/images/Explode_46.png new file mode 100644 index 0000000..27f100d Binary files /dev/null and b/images/Explode_46.png differ diff --git a/images/Explode_47.png b/images/Explode_47.png new file mode 100644 index 0000000..cd4b614 Binary files /dev/null and b/images/Explode_47.png differ diff --git a/images/Explode_48.png b/images/Explode_48.png new file mode 100644 index 0000000..4ab21f3 Binary files /dev/null and b/images/Explode_48.png differ diff --git a/images/Explode_49.png b/images/Explode_49.png new file mode 100644 index 0000000..80ad854 Binary files /dev/null and b/images/Explode_49.png differ diff --git a/images/Explode_5.png b/images/Explode_5.png new file mode 100644 index 0000000..9c04dc7 Binary files /dev/null and b/images/Explode_5.png differ diff --git a/images/Explode_50.png b/images/Explode_50.png new file mode 100644 index 0000000..4211fe2 Binary files /dev/null and b/images/Explode_50.png differ diff --git a/images/Explode_51.png b/images/Explode_51.png new file mode 100644 index 0000000..6badaf5 Binary files /dev/null and b/images/Explode_51.png differ diff --git a/images/Explode_52.png b/images/Explode_52.png new file mode 100644 index 0000000..14c5cc1 Binary files /dev/null and b/images/Explode_52.png differ diff --git a/images/Explode_53.png b/images/Explode_53.png new file mode 100644 index 0000000..eca3f4b Binary files /dev/null and b/images/Explode_53.png differ diff --git a/images/Explode_54.png b/images/Explode_54.png new file mode 100644 index 0000000..d4aafde Binary files /dev/null and b/images/Explode_54.png differ diff --git a/images/Explode_55.png b/images/Explode_55.png new file mode 100644 index 0000000..c58b9d7 Binary files /dev/null and b/images/Explode_55.png differ diff --git a/images/Explode_56.png b/images/Explode_56.png new file mode 100644 index 0000000..7120fd1 Binary files /dev/null and b/images/Explode_56.png differ diff --git a/images/Explode_57.png b/images/Explode_57.png new file mode 100644 index 0000000..e36d969 Binary files /dev/null and b/images/Explode_57.png differ diff --git a/images/Explode_58.png b/images/Explode_58.png new file mode 100644 index 0000000..596d447 Binary files /dev/null and b/images/Explode_58.png differ diff --git a/images/Explode_59.png b/images/Explode_59.png new file mode 100644 index 0000000..1083e8d Binary files /dev/null and b/images/Explode_59.png differ diff --git a/images/Explode_6.png b/images/Explode_6.png new file mode 100644 index 0000000..37e36fd Binary files /dev/null and b/images/Explode_6.png differ diff --git a/images/Explode_60.png b/images/Explode_60.png new file mode 100644 index 0000000..ef06e50 Binary files /dev/null and b/images/Explode_60.png differ diff --git a/images/Explode_61.png b/images/Explode_61.png new file mode 100644 index 0000000..4ed4497 Binary files /dev/null and b/images/Explode_61.png differ diff --git a/images/Explode_62.png b/images/Explode_62.png new file mode 100644 index 0000000..45bc201 Binary files /dev/null and b/images/Explode_62.png differ diff --git a/images/Explode_63.png b/images/Explode_63.png new file mode 100644 index 0000000..589d831 Binary files /dev/null and b/images/Explode_63.png differ diff --git a/images/Explode_64.png b/images/Explode_64.png new file mode 100644 index 0000000..5a2665a Binary files /dev/null and b/images/Explode_64.png differ diff --git a/images/Explode_7.png b/images/Explode_7.png new file mode 100644 index 0000000..993ebfb Binary files /dev/null and b/images/Explode_7.png differ diff --git a/images/Explode_8.png b/images/Explode_8.png new file mode 100644 index 0000000..b730c31 Binary files /dev/null and b/images/Explode_8.png differ diff --git a/images/Explode_9.png b/images/Explode_9.png new file mode 100644 index 0000000..1d8a499 Binary files /dev/null and b/images/Explode_9.png differ diff --git a/images/Hi.py b/images/Hi.py new file mode 100644 index 0000000..85b6150 --- /dev/null +++ b/images/Hi.py @@ -0,0 +1,51 @@ +from PIL import Image +import numpy as np +import os + +def resizeNum(img, width, height): + img = img.resize((width, height),Image.ANTIALIAS) + return img + +def splitAlphabet(starting_index, save_index): + loadPath = r"D:\Machine learning\Alphabet Img\Origin\num_" + savePath = r"D:\Machine learning\Alphabet Img\Splited\num_" + index = starting_index + while True: + try: + image = Image.open(loadPath + str(index) + ".PNG").convert("L") + size = image.size + height = size[1] / 4 + width = size[0] / 13 + for j in range(4): + for i in range(13): + box = (i * width, j * height, (i+1) * width, (j + 1) * height) + cropped_image = image.crop(box) + cropped_image = resizeNum(cropped_image, 32, 32) + cropped_image.save(savePath + str(index + save_index) + "_" + str(13 * j + i) + ".png") + print("index "+ str(index) + " complete") + except: + print("load until index = " + str(index)) + break + index += 1 + +def turnImgToNumpy(): + image = Image.open(r"D:\Machine learning\Number Img\splited\num_0_0.png") + image = np.array(image).reshape(1,1,28,28) + loadPath = r"D:\Machine learning\Number Img\splited\num_" + + for i in range(10): + for j in range (10): + tmp = Image.open(loadPath + str(i) + "_" + str(j) + ".png") + tmp = np.array(tmp).reshape(1,1,28, 28) + image = np.append(image, tmp, axis = 0) +savePath = r"D:\Programming\GreenFoot\TankGame\images\ExplodeEffect\Explode_" +image = Image.open(r"D:\Programming\GreenFoot\TankGame\images\Explode.png") +size = image.size +height = size[1] / 8 +width = size[0] / 9 +for j in range(8): + for i in range(9): + box = (i * width, j * height, (i+1) * width, (j + 1) * height) + cropped_image = image.crop(box) + cropped_image = resizeNum(cropped_image, 50, 50) + cropped_image.save(savePath + str(64 - (8 * j + i)) + ".png") diff --git a/images/M_Tank.png b/images/M_Tank.png new file mode 100644 index 0000000..13ab206 Binary files /dev/null and b/images/M_Tank.png differ diff --git a/images/M_Turret.png b/images/M_Turret.png new file mode 100644 index 0000000..5b8cf16 Binary files /dev/null and b/images/M_Turret.png differ diff --git a/images/Origin File/Bullet.png b/images/Origin File/Bullet.png new file mode 100644 index 0000000..33b0bb0 Binary files /dev/null and b/images/Origin File/Bullet.png differ diff --git a/images/Origin File/E_GunTurret.png b/images/Origin File/E_GunTurret.png new file mode 100644 index 0000000..9828426 Binary files /dev/null and b/images/Origin File/E_GunTurret.png differ diff --git a/images/Origin File/E_Tank.png b/images/Origin File/E_Tank.png new file mode 100644 index 0000000..b042572 Binary files /dev/null and b/images/Origin File/E_Tank.png differ diff --git a/images/Origin File/M_GunTurret.png b/images/Origin File/M_GunTurret.png new file mode 100644 index 0000000..78ee44e Binary files /dev/null and b/images/Origin File/M_GunTurret.png differ diff --git a/images/Origin File/M_Tank.png b/images/Origin File/M_Tank.png new file mode 100644 index 0000000..b868ad5 Binary files /dev/null and b/images/Origin File/M_Tank.png differ diff --git a/images/Path_0.png b/images/Path_0.png new file mode 100644 index 0000000..d012faa Binary files /dev/null and b/images/Path_0.png differ diff --git a/images/Path_1.png b/images/Path_1.png new file mode 100644 index 0000000..54b8b68 Binary files /dev/null and b/images/Path_1.png differ diff --git a/images/Wall.png b/images/Wall.png new file mode 100644 index 0000000..1fbf75e Binary files /dev/null and b/images/Wall.png differ diff --git a/images/corkboard.jpg b/images/corkboard.jpg new file mode 100644 index 0000000..3cc8e39 Binary files /dev/null and b/images/corkboard.jpg differ diff --git a/images/crumpled-paper.jpg b/images/crumpled-paper.jpg new file mode 100644 index 0000000..de07ed8 Binary files /dev/null and b/images/crumpled-paper.jpg differ diff --git a/images/sand2.jpg b/images/sand2.jpg new file mode 100644 index 0000000..4a754fc Binary files /dev/null and b/images/sand2.jpg differ diff --git a/project.greenfoot b/project.greenfoot new file mode 100644 index 0000000..72c0e06 --- /dev/null +++ b/project.greenfoot @@ -0,0 +1,208 @@ +#Greenfoot project file +class.Bullet.image=Bullet-removebg-preview.png +class.Explosion.image=Explode_0.png +class.Path.image=Path_0.png +class.TankBody.image=Me-removebg-preview.png +class.TankWorld.image=sand2.jpg +class.Wall.image=Wall.png +dependency1.from=TankWorld +dependency1.to=TankBody +dependency1.type=UsesDependency +dependency10.from=Path +dependency10.to=TankWorld +dependency10.type=UsesDependency +dependency11.from=Mover +dependency11.to=Point +dependency11.type=UsesDependency +dependency12.from=Bullet +dependency12.to=Point +dependency12.type=UsesDependency +dependency13.from=Bullet +dependency13.to=TankBody +dependency13.type=UsesDependency +dependency14.from=Bullet +dependency14.to=TankWorld +dependency14.type=UsesDependency +dependency15.from=Bullet +dependency15.to=MyMath +dependency15.type=UsesDependency +dependency16.from=Bullet +dependency16.to=Barrier +dependency16.type=UsesDependency +dependency17.from=TankTurret +dependency17.to=TankBody +dependency17.type=UsesDependency +dependency18.from=TankTurret +dependency18.to=Point +dependency18.type=UsesDependency +dependency19.from=TankTurret +dependency19.to=TankWorld +dependency19.type=UsesDependency +dependency2.from=TankWorld +dependency2.to=Point +dependency2.type=UsesDependency +dependency20.from=TankTurret +dependency20.to=MyMath +dependency20.type=UsesDependency +dependency21.from=TankBody +dependency21.to=TankTurret +dependency21.type=UsesDependency +dependency22.from=TankBody +dependency22.to=Point +dependency22.type=UsesDependency +dependency23.from=TankBody +dependency23.to=Path +dependency23.type=UsesDependency +dependency24.from=TankBody +dependency24.to=TankWorld +dependency24.type=UsesDependency +dependency25.from=TankBody +dependency25.to=MyMath +dependency25.type=UsesDependency +dependency26.from=TankBody +dependency26.to=Barrier +dependency26.type=UsesDependency +dependency27.from=MyMath +dependency27.to=Point +dependency27.type=UsesDependency +dependency28.from=Point +dependency28.to=MyMath +dependency28.type=UsesDependency +dependency3.from=TankWorld +dependency3.to=Wall +dependency3.type=UsesDependency +dependency4.from=TankWorld +dependency4.to=Bullet +dependency4.type=UsesDependency +dependency5.from=TankWorld +dependency5.to=Explosion +dependency5.type=UsesDependency +dependency6.from=TankWorld +dependency6.to=Animation +dependency6.type=UsesDependency +dependency7.from=TankWorld +dependency7.to=Path +dependency7.type=UsesDependency +dependency8.from=Path +dependency8.to=Point +dependency8.type=UsesDependency +dependency9.from=Path +dependency9.to=MyMath +dependency9.type=UsesDependency +editor.fx.0.height=0 +editor.fx.0.width=0 +editor.fx.0.x=0 +editor.fx.0.y=0 +height=974 +package.numDependencies=28 +package.numTargets=13 +project.charset=UTF-8 +publish.hasSource=false +publish.locked=true +publish.longDesc= +publish.shortDesc= +publish.tags= +publish.title= +publish.url= +readme.height=58 +readme.name=@README +readme.width=47 +readme.x=10 +readme.y=10 +simulation.speed=48 +target1.height=50 +target1.name=Path +target1.showInterface=false +target1.type=ClassTarget +target1.width=80 +target1.x=0 +target1.y=0 +target10.height=50 +target10.name=GetEricStupidJson +target10.showInterface=false +target10.type=ClassTarget +target10.width=120 +target10.x=0 +target10.y=0 +target11.height=50 +target11.name=Animation +target11.showInterface=false +target11.type=ClassTarget +target11.width=80 +target11.x=0 +target11.y=0 +target12.height=50 +target12.name=TankTurret +target12.showInterface=false +target12.type=ClassTarget +target12.width=80 +target12.x=0 +target12.y=0 +target13.height=50 +target13.name=TankBody +target13.showInterface=false +target13.type=ClassTarget +target13.width=80 +target13.x=0 +target13.y=0 +target2.height=50 +target2.name=TankWorld +target2.showInterface=false +target2.type=ClassTarget +target2.width=80 +target2.x=0 +target2.y=0 +target3.height=50 +target3.name=Bullet +target3.showInterface=false +target3.type=ClassTarget +target3.width=80 +target3.x=0 +target3.y=0 +target4.height=50 +target4.name=Explosion +target4.showInterface=false +target4.type=ClassTarget +target4.width=80 +target4.x=0 +target4.y=0 +target5.height=50 +target5.name=Wall +target5.showInterface=false +target5.type=ClassTarget +target5.width=80 +target5.x=0 +target5.y=0 +target6.height=50 +target6.name=MyMath +target6.showInterface=false +target6.type=ClassTarget +target6.width=80 +target6.x=0 +target6.y=0 +target7.height=50 +target7.name=Barrier +target7.showInterface=false +target7.type=ClassTarget +target7.width=80 +target7.x=0 +target7.y=0 +target8.height=50 +target8.name=Point +target8.showInterface=false +target8.type=ClassTarget +target8.width=80 +target8.x=0 +target8.y=0 +target9.height=50 +target9.name=Mover +target9.showInterface=false +target9.type=ClassTarget +target9.width=80 +target9.x=0 +target9.y=0 +version=3.0.0 +width=1649 +world.lastInstantiated=TankWorld +xPosition=0 +yPosition=0