diff --git a/src/main/java/com/msb/TankDemo.java b/src/main/java/com/msb/TankDemo.java index b9e0274..9b94ca9 100644 --- a/src/main/java/com/msb/TankDemo.java +++ b/src/main/java/com/msb/TankDemo.java @@ -1,5 +1,10 @@ package com.msb; +import com.msb.base.PropertyMgr; +import com.msb.enums.DirEnum; +import com.msb.enums.GroupEnum; +import com.msb.model.Tank; + import java.util.Random; /** diff --git a/src/main/java/com/msb/TankFrame.java b/src/main/java/com/msb/TankFrame.java index 8749221..948ed68 100644 --- a/src/main/java/com/msb/TankFrame.java +++ b/src/main/java/com/msb/TankFrame.java @@ -1,5 +1,11 @@ package com.msb; +import com.msb.enums.DirEnum; +import com.msb.enums.GroupEnum; +import com.msb.model.Bullet; +import com.msb.model.Explode; +import com.msb.model.Tank; + import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -20,9 +26,9 @@ public class TankFrame extends Frame { Tank myTank = new Tank(100, 500, DirEnum.RIGHT, GroupEnum.GOOD, this); // Explode explode = new Explode(100, 100, this); // Bullet bullet = new Bullet(200, 200, DirEnum.DOWN); - List bullets = new ArrayList<>(); - List tanks = new ArrayList<>(); //敌方坦克 - List explodes = new ArrayList<>(); //爆炸效果 + public List bullets = new ArrayList<>(); + public List tanks = new ArrayList<>(); //敌方坦克 + public List explodes = new ArrayList<>(); //爆炸效果 public static final int GAME_WIDTH = 1000; public static final int GAME_HEIGHT = 800; diff --git a/src/main/java/com/msb/PropertyMgr.java b/src/main/java/com/msb/base/PropertyMgr.java similarity index 94% rename from src/main/java/com/msb/PropertyMgr.java rename to src/main/java/com/msb/base/PropertyMgr.java index 407f95b..75eb215 100644 --- a/src/main/java/com/msb/PropertyMgr.java +++ b/src/main/java/com/msb/base/PropertyMgr.java @@ -1,7 +1,6 @@ -package com.msb; +package com.msb.base; import java.io.IOException; -import java.util.Objects; import java.util.Properties; /** diff --git a/src/main/java/com/msb/ResourcesMgr.java b/src/main/java/com/msb/base/ResourcesMgr.java similarity index 96% rename from src/main/java/com/msb/ResourcesMgr.java rename to src/main/java/com/msb/base/ResourcesMgr.java index 7c4f241..e5a8a80 100644 --- a/src/main/java/com/msb/ResourcesMgr.java +++ b/src/main/java/com/msb/base/ResourcesMgr.java @@ -1,6 +1,6 @@ -package com.msb; +package com.msb.base; -import com.msb.util.ImageUtil; +import com.msb.utils.ImageUtil; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; diff --git a/src/main/java/com/msb/abstractFactory/AK47.java b/src/main/java/com/msb/base/dp/abstractFactory/AK47.java similarity index 88% rename from src/main/java/com/msb/abstractFactory/AK47.java rename to src/main/java/com/msb/base/dp/abstractFactory/AK47.java index 535e8f5..467cae8 100644 --- a/src/main/java/com/msb/abstractFactory/AK47.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/AK47.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 15:40 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/AbstractFactory.java b/src/main/java/com/msb/base/dp/abstractFactory/AbstractFactory.java similarity index 89% rename from src/main/java/com/msb/abstractFactory/AbstractFactory.java rename to src/main/java/com/msb/base/dp/abstractFactory/AbstractFactory.java index b843a60..a46f2b0 100644 --- a/src/main/java/com/msb/abstractFactory/AbstractFactory.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/AbstractFactory.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:42 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Bread.java b/src/main/java/com/msb/base/dp/abstractFactory/Bread.java similarity index 88% rename from src/main/java/com/msb/abstractFactory/Bread.java rename to src/main/java/com/msb/base/dp/abstractFactory/Bread.java index 9136d5f..cccba07 100644 --- a/src/main/java/com/msb/abstractFactory/Bread.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Bread.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 15:41 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Car.java b/src/main/java/com/msb/base/dp/abstractFactory/Car.java similarity index 88% rename from src/main/java/com/msb/abstractFactory/Car.java rename to src/main/java/com/msb/base/dp/abstractFactory/Car.java index c9a93ba..190c597 100644 --- a/src/main/java/com/msb/abstractFactory/Car.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Car.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 15:39 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Food.java b/src/main/java/com/msb/base/dp/abstractFactory/Food.java similarity index 86% rename from src/main/java/com/msb/abstractFactory/Food.java rename to src/main/java/com/msb/base/dp/abstractFactory/Food.java index 1030a1f..5cbbac8 100644 --- a/src/main/java/com/msb/abstractFactory/Food.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Food.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:43 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Main.java b/src/main/java/com/msb/base/dp/abstractFactory/Main.java similarity index 92% rename from src/main/java/com/msb/abstractFactory/Main.java rename to src/main/java/com/msb/base/dp/abstractFactory/Main.java index 33862bc..75b0900 100644 --- a/src/main/java/com/msb/abstractFactory/Main.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Main.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:23 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/ModernFactory.java b/src/main/java/com/msb/base/dp/abstractFactory/ModernFactory.java similarity index 92% rename from src/main/java/com/msb/abstractFactory/ModernFactory.java rename to src/main/java/com/msb/base/dp/abstractFactory/ModernFactory.java index 3d544a2..7cd30ac 100644 --- a/src/main/java/com/msb/abstractFactory/ModernFactory.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/ModernFactory.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:55 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Vehicle.java b/src/main/java/com/msb/base/dp/abstractFactory/Vehicle.java similarity index 86% rename from src/main/java/com/msb/abstractFactory/Vehicle.java rename to src/main/java/com/msb/base/dp/abstractFactory/Vehicle.java index cca678f..7d5231c 100644 --- a/src/main/java/com/msb/abstractFactory/Vehicle.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Vehicle.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:44 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/abstractFactory/Weapon.java b/src/main/java/com/msb/base/dp/abstractFactory/Weapon.java similarity index 86% rename from src/main/java/com/msb/abstractFactory/Weapon.java rename to src/main/java/com/msb/base/dp/abstractFactory/Weapon.java index f1b6856..f299e70 100644 --- a/src/main/java/com/msb/abstractFactory/Weapon.java +++ b/src/main/java/com/msb/base/dp/abstractFactory/Weapon.java @@ -1,4 +1,4 @@ -package com.msb.abstractFactory;/** +package com.msb.base.dp.abstractFactory;/** * @Author bingor * @Date 2022/10/8 16:43 * @Description: com.msb.abstractFactory diff --git a/src/main/java/com/msb/factory/Car.java b/src/main/java/com/msb/base/dp/factory/Car.java similarity index 89% rename from src/main/java/com/msb/factory/Car.java rename to src/main/java/com/msb/base/dp/factory/Car.java index c72015c..9de7483 100644 --- a/src/main/java/com/msb/factory/Car.java +++ b/src/main/java/com/msb/base/dp/factory/Car.java @@ -1,4 +1,4 @@ -package com.msb.factory;/** +package com.msb.base.dp.factory;/** * @Author bingor * @Date 2022/10/8 14:49 * @Description: com.msb.factory diff --git a/src/main/java/com/msb/factory/CarFactory.java b/src/main/java/com/msb/base/dp/factory/CarFactory.java similarity index 90% rename from src/main/java/com/msb/factory/CarFactory.java rename to src/main/java/com/msb/base/dp/factory/CarFactory.java index 5e60891..b665981 100644 --- a/src/main/java/com/msb/factory/CarFactory.java +++ b/src/main/java/com/msb/base/dp/factory/CarFactory.java @@ -1,4 +1,4 @@ -package com.msb.factory;/** +package com.msb.base.dp.factory;/** * @Author bingor * @Date 2022/10/8 15:08 * @Description: com.msb.factory diff --git a/src/main/java/com/msb/factory/Main.java b/src/main/java/com/msb/base/dp/factory/Main.java similarity index 91% rename from src/main/java/com/msb/factory/Main.java rename to src/main/java/com/msb/base/dp/factory/Main.java index 96d4333..cb68f2c 100644 --- a/src/main/java/com/msb/factory/Main.java +++ b/src/main/java/com/msb/base/dp/factory/Main.java @@ -1,4 +1,4 @@ -package com.msb.factory;/** +package com.msb.base.dp.factory;/** * @Author bingor * @Date 2022/10/8 14:51 * @Description: com.msb.factory diff --git a/src/main/java/com/msb/factory/Moveable.java b/src/main/java/com/msb/base/dp/factory/Moveable.java similarity index 82% rename from src/main/java/com/msb/factory/Moveable.java rename to src/main/java/com/msb/base/dp/factory/Moveable.java index 106805f..aba9892 100644 --- a/src/main/java/com/msb/factory/Moveable.java +++ b/src/main/java/com/msb/base/dp/factory/Moveable.java @@ -1,4 +1,4 @@ -package com.msb.factory; +package com.msb.base.dp.factory; /** * @Author bingor diff --git a/src/main/java/com/msb/factory/Plane.java b/src/main/java/com/msb/base/dp/factory/Plane.java similarity index 90% rename from src/main/java/com/msb/factory/Plane.java rename to src/main/java/com/msb/base/dp/factory/Plane.java index cd8a6b7..4928617 100644 --- a/src/main/java/com/msb/factory/Plane.java +++ b/src/main/java/com/msb/base/dp/factory/Plane.java @@ -1,4 +1,4 @@ -package com.msb.factory;/** +package com.msb.base.dp.factory;/** * @Author bingor * @Date 2022/10/8 14:49 * @Description: com.msb.factory diff --git a/src/main/java/com/msb/factory/SimpleVehicleFactory.java b/src/main/java/com/msb/base/dp/factory/SimpleVehicleFactory.java similarity index 92% rename from src/main/java/com/msb/factory/SimpleVehicleFactory.java rename to src/main/java/com/msb/base/dp/factory/SimpleVehicleFactory.java index 4ce0db8..9de0231 100644 --- a/src/main/java/com/msb/factory/SimpleVehicleFactory.java +++ b/src/main/java/com/msb/base/dp/factory/SimpleVehicleFactory.java @@ -1,4 +1,4 @@ -package com.msb.factory;/** +package com.msb.base.dp.factory;/** * @Author bingor * @Date 2022/10/8 15:04 * @Description: com.msb.factory diff --git a/src/main/java/com/msb/singleton/Singleton01.java b/src/main/java/com/msb/base/dp/singleton/Singleton01.java similarity index 95% rename from src/main/java/com/msb/singleton/Singleton01.java rename to src/main/java/com/msb/base/dp/singleton/Singleton01.java index 4ff0c8c..762661d 100644 --- a/src/main/java/com/msb/singleton/Singleton01.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton01.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; /** * @Author bingor diff --git a/src/main/java/com/msb/singleton/Singleton02.java b/src/main/java/com/msb/base/dp/singleton/Singleton02.java similarity index 94% rename from src/main/java/com/msb/singleton/Singleton02.java rename to src/main/java/com/msb/base/dp/singleton/Singleton02.java index 711ed9e..6ae0e76 100644 --- a/src/main/java/com/msb/singleton/Singleton02.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton02.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; /** * @Author bingor diff --git a/src/main/java/com/msb/singleton/Singleton03.java b/src/main/java/com/msb/base/dp/singleton/Singleton03.java similarity index 96% rename from src/main/java/com/msb/singleton/Singleton03.java rename to src/main/java/com/msb/base/dp/singleton/Singleton03.java index 4272f05..444b126 100644 --- a/src/main/java/com/msb/singleton/Singleton03.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton03.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; import java.util.Objects; diff --git a/src/main/java/com/msb/singleton/Singleton04.java b/src/main/java/com/msb/base/dp/singleton/Singleton04.java similarity index 96% rename from src/main/java/com/msb/singleton/Singleton04.java rename to src/main/java/com/msb/base/dp/singleton/Singleton04.java index 524466b..fa56ba9 100644 --- a/src/main/java/com/msb/singleton/Singleton04.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton04.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; import java.util.Objects; diff --git a/src/main/java/com/msb/singleton/Singleton05.java b/src/main/java/com/msb/base/dp/singleton/Singleton05.java similarity index 97% rename from src/main/java/com/msb/singleton/Singleton05.java rename to src/main/java/com/msb/base/dp/singleton/Singleton05.java index 4008005..e161d0f 100644 --- a/src/main/java/com/msb/singleton/Singleton05.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton05.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; import java.util.Objects; diff --git a/src/main/java/com/msb/singleton/Singleton06.java b/src/main/java/com/msb/base/dp/singleton/Singleton06.java similarity index 97% rename from src/main/java/com/msb/singleton/Singleton06.java rename to src/main/java/com/msb/base/dp/singleton/Singleton06.java index 878ef74..63537b6 100644 --- a/src/main/java/com/msb/singleton/Singleton06.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton06.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; import java.util.Objects; diff --git a/src/main/java/com/msb/singleton/Singleton07.java b/src/main/java/com/msb/base/dp/singleton/Singleton07.java similarity index 93% rename from src/main/java/com/msb/singleton/Singleton07.java rename to src/main/java/com/msb/base/dp/singleton/Singleton07.java index 95efc70..fa7e63c 100644 --- a/src/main/java/com/msb/singleton/Singleton07.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton07.java @@ -1,6 +1,4 @@ -package com.msb.singleton; - -import java.util.Objects; +package com.msb.base.dp.singleton; /** * @Author bingor diff --git a/src/main/java/com/msb/singleton/Singleton08.java b/src/main/java/com/msb/base/dp/singleton/Singleton08.java similarity index 93% rename from src/main/java/com/msb/singleton/Singleton08.java rename to src/main/java/com/msb/base/dp/singleton/Singleton08.java index ecf0ea4..202fcf0 100644 --- a/src/main/java/com/msb/singleton/Singleton08.java +++ b/src/main/java/com/msb/base/dp/singleton/Singleton08.java @@ -1,4 +1,4 @@ -package com.msb.singleton; +package com.msb.base.dp.singleton; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Cat.java b/src/main/java/com/msb/base/dp/strategy/Cat.java similarity index 94% rename from src/main/java/com/msb/strategy/Cat.java rename to src/main/java/com/msb/base/dp/strategy/Cat.java index f7a002f..3503729 100644 --- a/src/main/java/com/msb/strategy/Cat.java +++ b/src/main/java/com/msb/base/dp/strategy/Cat.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Cat2.java b/src/main/java/com/msb/base/dp/strategy/Cat2.java similarity index 94% rename from src/main/java/com/msb/strategy/Cat2.java rename to src/main/java/com/msb/base/dp/strategy/Cat2.java index 116c232..53edf79 100644 --- a/src/main/java/com/msb/strategy/Cat2.java +++ b/src/main/java/com/msb/base/dp/strategy/Cat2.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/CatHeightComparator.java b/src/main/java/com/msb/base/dp/strategy/CatHeightComparator.java similarity index 91% rename from src/main/java/com/msb/strategy/CatHeightComparator.java rename to src/main/java/com/msb/base/dp/strategy/CatHeightComparator.java index bd6021d..c5a5111 100644 --- a/src/main/java/com/msb/strategy/CatHeightComparator.java +++ b/src/main/java/com/msb/base/dp/strategy/CatHeightComparator.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/CatWeightComparator.java b/src/main/java/com/msb/base/dp/strategy/CatWeightComparator.java similarity index 91% rename from src/main/java/com/msb/strategy/CatWeightComparator.java rename to src/main/java/com/msb/base/dp/strategy/CatWeightComparator.java index 537fadf..c58c6f6 100644 --- a/src/main/java/com/msb/strategy/CatWeightComparator.java +++ b/src/main/java/com/msb/base/dp/strategy/CatWeightComparator.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Comparable.java b/src/main/java/com/msb/base/dp/strategy/Comparable.java similarity index 82% rename from src/main/java/com/msb/strategy/Comparable.java rename to src/main/java/com/msb/base/dp/strategy/Comparable.java index ebc13f9..293282e 100644 --- a/src/main/java/com/msb/strategy/Comparable.java +++ b/src/main/java/com/msb/base/dp/strategy/Comparable.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Comparator.java b/src/main/java/com/msb/base/dp/strategy/Comparator.java similarity index 83% rename from src/main/java/com/msb/strategy/Comparator.java rename to src/main/java/com/msb/base/dp/strategy/Comparator.java index 35429a9..478a5b8 100644 --- a/src/main/java/com/msb/strategy/Comparator.java +++ b/src/main/java/com/msb/base/dp/strategy/Comparator.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Dog.java b/src/main/java/com/msb/base/dp/strategy/Dog.java similarity index 93% rename from src/main/java/com/msb/strategy/Dog.java rename to src/main/java/com/msb/base/dp/strategy/Dog.java index 0e9333e..3c354aa 100644 --- a/src/main/java/com/msb/strategy/Dog.java +++ b/src/main/java/com/msb/base/dp/strategy/Dog.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; /** * @Author bingor diff --git a/src/main/java/com/msb/strategy/Sorter.java b/src/main/java/com/msb/base/dp/strategy/Sorter.java similarity index 96% rename from src/main/java/com/msb/strategy/Sorter.java rename to src/main/java/com/msb/base/dp/strategy/Sorter.java index abb3d50..e0b2453 100644 --- a/src/main/java/com/msb/strategy/Sorter.java +++ b/src/main/java/com/msb/base/dp/strategy/Sorter.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; import java.util.Arrays; diff --git a/src/main/java/com/msb/strategy/Sorter2.java b/src/main/java/com/msb/base/dp/strategy/Sorter2.java similarity index 96% rename from src/main/java/com/msb/strategy/Sorter2.java rename to src/main/java/com/msb/base/dp/strategy/Sorter2.java index 2e81ba9..6c9333f 100644 --- a/src/main/java/com/msb/strategy/Sorter2.java +++ b/src/main/java/com/msb/base/dp/strategy/Sorter2.java @@ -1,4 +1,4 @@ -package com.msb.strategy; +package com.msb.base.dp.strategy; import java.util.Arrays; diff --git a/src/main/java/com/msb/DirEnum.java b/src/main/java/com/msb/enums/DirEnum.java similarity index 94% rename from src/main/java/com/msb/DirEnum.java rename to src/main/java/com/msb/enums/DirEnum.java index f9e8c23..9b69236 100644 --- a/src/main/java/com/msb/DirEnum.java +++ b/src/main/java/com/msb/enums/DirEnum.java @@ -1,4 +1,4 @@ -package com.msb; +package com.msb.enums; /** * @Author bingor diff --git a/src/main/java/com/msb/GroupEnum.java b/src/main/java/com/msb/enums/GroupEnum.java similarity index 85% rename from src/main/java/com/msb/GroupEnum.java rename to src/main/java/com/msb/enums/GroupEnum.java index a6e088c..308ff9d 100644 --- a/src/main/java/com/msb/GroupEnum.java +++ b/src/main/java/com/msb/enums/GroupEnum.java @@ -1,4 +1,4 @@ -package com.msb; +package com.msb.enums; /** * @Author bingor diff --git a/src/main/java/com/msb/FireStrategy.java b/src/main/java/com/msb/inter/FireStrategy.java similarity index 75% rename from src/main/java/com/msb/FireStrategy.java rename to src/main/java/com/msb/inter/FireStrategy.java index 68f579e..1388381 100644 --- a/src/main/java/com/msb/FireStrategy.java +++ b/src/main/java/com/msb/inter/FireStrategy.java @@ -1,4 +1,6 @@ -package com.msb; +package com.msb.inter; + +import com.msb.model.Tank; /** * @Author bingor diff --git a/src/main/java/com/msb/DefaultFireStrategy.java b/src/main/java/com/msb/inter/impl/DefaultFireStrategy.java similarity index 81% rename from src/main/java/com/msb/DefaultFireStrategy.java rename to src/main/java/com/msb/inter/impl/DefaultFireStrategy.java index 4b8d031..b0a8feb 100644 --- a/src/main/java/com/msb/DefaultFireStrategy.java +++ b/src/main/java/com/msb/inter/impl/DefaultFireStrategy.java @@ -1,10 +1,14 @@ -package com.msb;/** +package com.msb.inter.impl;/** * @Author bingor * @Date 2022/10/8 11:21 * @Description: com.msb * @Version: 1.0 */ +import com.msb.model.Bullet; +import com.msb.model.Tank; +import com.msb.inter.FireStrategy; + /** *@ClassName DefaultFireStrategy *@Description TODO diff --git a/src/main/java/com/msb/FourFireStrategy.java b/src/main/java/com/msb/inter/impl/FourFireStrategy.java similarity index 79% rename from src/main/java/com/msb/FourFireStrategy.java rename to src/main/java/com/msb/inter/impl/FourFireStrategy.java index 5bc88ef..552fda2 100644 --- a/src/main/java/com/msb/FourFireStrategy.java +++ b/src/main/java/com/msb/inter/impl/FourFireStrategy.java @@ -1,10 +1,15 @@ -package com.msb;/** +package com.msb.inter.impl;/** * @Author bingor * @Date 2022/10/8 11:21 * @Description: com.msb * @Version: 1.0 */ +import com.msb.model.Bullet; +import com.msb.model.Tank; +import com.msb.enums.DirEnum; +import com.msb.inter.FireStrategy; + /** *@ClassName DefaultFireStrategy *@Description TODO diff --git a/src/main/java/com/msb/Bullet.java b/src/main/java/com/msb/model/Bullet.java similarity index 95% rename from src/main/java/com/msb/Bullet.java rename to src/main/java/com/msb/model/Bullet.java index ac3e934..093720f 100644 --- a/src/main/java/com/msb/Bullet.java +++ b/src/main/java/com/msb/model/Bullet.java @@ -1,4 +1,9 @@ -package com.msb; +package com.msb.model; + +import com.msb.TankFrame; +import com.msb.base.ResourcesMgr; +import com.msb.enums.DirEnum; +import com.msb.enums.GroupEnum; import java.awt.*; diff --git a/src/main/java/com/msb/Explode.java b/src/main/java/com/msb/model/Explode.java similarity index 91% rename from src/main/java/com/msb/Explode.java rename to src/main/java/com/msb/model/Explode.java index 45e03d9..3000eeb 100644 --- a/src/main/java/com/msb/Explode.java +++ b/src/main/java/com/msb/model/Explode.java @@ -1,4 +1,7 @@ -package com.msb; +package com.msb.model; + +import com.msb.TankFrame; +import com.msb.base.ResourcesMgr; import java.awt.*; diff --git a/src/main/java/com/msb/Tank.java b/src/main/java/com/msb/model/Tank.java similarity index 95% rename from src/main/java/com/msb/Tank.java rename to src/main/java/com/msb/model/Tank.java index c74de42..c732b50 100644 --- a/src/main/java/com/msb/Tank.java +++ b/src/main/java/com/msb/model/Tank.java @@ -1,4 +1,11 @@ -package com.msb; +package com.msb.model; + +import com.msb.TankFrame; +import com.msb.base.PropertyMgr; +import com.msb.base.ResourcesMgr; +import com.msb.enums.DirEnum; +import com.msb.enums.GroupEnum; +import com.msb.inter.FireStrategy; import java.awt.*; import java.util.Random; diff --git a/src/main/java/com/msb/util/ImageUtil.java b/src/main/java/com/msb/utils/ImageUtil.java similarity index 97% rename from src/main/java/com/msb/util/ImageUtil.java rename to src/main/java/com/msb/utils/ImageUtil.java index 48d9033..abc6c85 100644 --- a/src/main/java/com/msb/util/ImageUtil.java +++ b/src/main/java/com/msb/utils/ImageUtil.java @@ -1,4 +1,4 @@ -package com.msb.util; +package com.msb.utils; import java.awt.Graphics2D; import java.awt.RenderingHints; diff --git a/src/main/resources/config.properties b/src/main/resources/config.properties index 97becb4..e32834e 100644 --- a/src/main/resources/config.properties +++ b/src/main/resources/config.properties @@ -6,5 +6,5 @@ gameWidth=1080 gameHeight=720 #fireStrategy -goodFS=com.msb.FourFireStrategy -badFS=com.msb.DefaultFireStrategy \ No newline at end of file +goodFS=com.msb.inter.impl.FourFireStrategy +badFS=com.msb.inter.impl.DefaultFireStrategy \ No newline at end of file diff --git a/src/test/java/CommonTest.java b/src/test/java/CommonTest.java index c03d9d2..ac38453 100644 --- a/src/test/java/CommonTest.java +++ b/src/test/java/CommonTest.java @@ -1,4 +1,4 @@ -import com.msb.DirEnum; +import com.msb.enums.DirEnum; import org.junit.Assert; import org.junit.Test;