refine package name
parent
610c9b5801
commit
e20d1a73f1
|
@ -0,0 +1,10 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="378" name="Java" />
|
||||
</Languages>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
|
@ -1,7 +1,7 @@
|
|||
package ca.cosc3p91.a2;
|
||||
package ca.cosc3p91.a3;
|
||||
|
||||
import ca.cosc3p91.a2.game.GameEngine;
|
||||
import ca.cosc3p91.a2.gameobjects.Stage;
|
||||
import ca.cosc3p91.a3.game.GameEngine;
|
||||
import ca.cosc3p91.a3.gameobjects.Stage;
|
||||
|
||||
public class Main {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package ca.cosc3p91.a2.game;
|
||||
package ca.cosc3p91.a3.game;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a2.player.*;
|
||||
import ca.cosc3p91.a2.util.Print;
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a2.util.Util;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
import ca.cosc3p91.a3.player.*;
|
||||
import ca.cosc3p91.a3.util.Print;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
import ca.cosc3p91.a3.util.Util;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.game;
|
||||
package ca.cosc3p91.a3.game;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Archer extends Infantry {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class ArcherTower extends DefenseBuilding {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Cannon extends DefenseBuilding {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class CasaDeNarino extends Building {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Catapult extends Infantry {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Collector implements Inhabitant {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public abstract class DefenseBuilding extends Building {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
class DefenseStage extends Stage {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class DefenseStages {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Farm extends ResourceBuilding {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public abstract class Infantry implements Inhabitant {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.game.Map;
|
||||
import ca.cosc3p91.a3.game.Map;
|
||||
|
||||
public interface Inhabitant {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class IronMine extends ResourceBuilding {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Knight extends Infantry {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class LumberMine extends ResourceBuilding {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public abstract class ResourceBuilding extends Building {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class ResourceStage extends Stage {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class ResourceStages {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class SaulGoodMine extends ResourceBuilding {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Soldier extends Infantry {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class VillageHallStages {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class VillageStage extends Stage {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Worker implements Inhabitant {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.player;
|
||||
package ca.cosc3p91.a3.player;
|
||||
|
||||
public class Player {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.userinterface;
|
||||
package ca.cosc3p91.a3.userinterface;
|
||||
|
||||
public class GuiManager {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
public class Time {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.game.Map;
|
||||
|
||||
public interface Inhabitant {
|
||||
|
||||
Map map = null;
|
||||
Building building = null;
|
||||
int lvl = 0;
|
||||
|
||||
void move(Tile t);
|
||||
|
||||
void getPosition();
|
||||
|
||||
int getLevel();
|
||||
void setLevel(int level);
|
||||
int getCost();
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package ca.cosc3p91.a2.player;
|
||||
|
||||
public class Player {
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package ca.cosc3p91.a2;
|
||||
package ca.cosc3p91.a3;
|
||||
|
||||
import ca.cosc3p91.a2.game.GameEngine;
|
||||
import ca.cosc3p91.a2.gameobjects.Stage;
|
||||
import ca.cosc3p91.a3.game.GameEngine;
|
||||
|
||||
public class Main {
|
||||
|
|
@ -1,14 +1,19 @@
|
|||
package ca.cosc3p91.a2.game;
|
||||
package ca.cosc3p91.a3.game;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a2.gameobjects.factory.BuildingFactory;
|
||||
import ca.cosc3p91.a2.gameobjects.factory.InhabitantFactory;
|
||||
import ca.cosc3p91.a2.player.*;
|
||||
import ca.cosc3p91.a2.userinterface.GameDisplay;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
import ca.cosc3p91.a3.gameobjects.factory.BuildingFactory;
|
||||
import ca.cosc3p91.a3.gameobjects.factory.InhabitantFactory;
|
||||
import ca.cosc3p91.a3.player.*;
|
||||
import ca.cosc3p91.a3.userinterface.GameDisplay;
|
||||
import ca.cosc3p91.a3.util.ChallengeAdapter;
|
||||
|
||||
import java.beans.XMLEncoder;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Random;
|
||||
|
||||
public class GameEngine<T> implements Runnable {
|
||||
public class GameEngine implements Runnable {
|
||||
|
||||
public static final double GOLD_FACTOR = 5;
|
||||
public static final double IRON_FACTOR = 1;
|
||||
|
@ -32,22 +37,24 @@ public class GameEngine<T> implements Runnable {
|
|||
}
|
||||
|
||||
public void attackVillage(Map map) {
|
||||
int defenseiveCounter = 1;
|
||||
int inhabCounter = 0;
|
||||
for (Building b : map.contains)
|
||||
if (b instanceof DefenseBuilding)
|
||||
defenseiveCounter++;
|
||||
for (Inhabitant i : map.inhabitants)
|
||||
if (i instanceof Infantry)
|
||||
inhabCounter++;
|
||||
pillageFactor = (float) inhabCounter / (float) defenseiveCounter;
|
||||
if (pillageFactor < 0)
|
||||
pillageFactor = 0;
|
||||
if (pillageFactor > 1)
|
||||
pillageFactor = 1;
|
||||
this.map.getTownHall().addWood((int) (map.getTownHall().getCurrentWood() * pillageFactor));
|
||||
this.map.getTownHall().addIron((int) (map.getTownHall().getCurrentIron() * pillageFactor));
|
||||
this.map.getTownHall().addGold((int) (map.getTownHall().getCurrentGold() * pillageFactor));
|
||||
// int defenseiveCounter = 1;
|
||||
// int inhabCounter = 0;
|
||||
// for (Building b : map.contains)
|
||||
// if (b instanceof DefenseBuilding)
|
||||
// defenseiveCounter++;
|
||||
// for (Inhabitant i : map.inhabitants)
|
||||
// if (i instanceof Infantry)
|
||||
// inhabCounter++;
|
||||
// pillageFactor = (float) inhabCounter / (float) defenseiveCounter;
|
||||
// if (pillageFactor < 0)
|
||||
// pillageFactor = 0;
|
||||
// if (pillageFactor > 1)
|
||||
// pillageFactor = 1;
|
||||
// this.map.getTownHall().addWood((int) (map.getTownHall().getCurrentWood() * pillageFactor));
|
||||
// this.map.getTownHall().addIron((int) (map.getTownHall().getCurrentIron() * pillageFactor));
|
||||
// this.map.getTownHall().addGold((int) (map.getTownHall().getCurrentGold() * pillageFactor));
|
||||
ChallengeAdapter adapter = new ChallengeAdapter(this.map);
|
||||
adapter.attack(map);
|
||||
}
|
||||
|
||||
private Map generateInitialMap(){
|
||||
|
@ -242,6 +249,17 @@ public class GameEngine<T> implements Runnable {
|
|||
if (deleteMyHeart)
|
||||
exploringMap = null;
|
||||
}
|
||||
save("test.xml", this.map);
|
||||
}
|
||||
|
||||
public void save(String file, Map map){
|
||||
try (XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(Files.newOutputStream(Paths.get(file))))) {
|
||||
map.contains.forEach(encoder::writeObject);
|
||||
map.inhabitants.forEach(encoder::writeObject);
|
||||
System.out.println("Wrote map");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.game;
|
||||
package ca.cosc3p91.a3.game;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Archer extends Infantry {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class ArcherTower extends DefenseBuilding {
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class Building {
|
||||
public abstract class Building implements Serializable {
|
||||
|
||||
// members
|
||||
private int level;
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Cannon extends DefenseBuilding {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class CasaDeNarino extends Building {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Catapult extends Infantry {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Collector implements Inhabitant {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public abstract class DefenseBuilding extends Building {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
class DefenseStage extends Stage {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class DefenseStages {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Farm extends ResourceBuilding {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public abstract class Infantry implements Inhabitant {
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface Inhabitant extends Serializable {
|
||||
|
||||
int lvl = 0;
|
||||
|
||||
void move(Tile t);
|
||||
|
||||
void getPosition();
|
||||
|
||||
int getLevel();
|
||||
void setLevel(int level);
|
||||
int getCost();
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class IronMine extends ResourceBuilding {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Knight extends Infantry {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class LumberMine extends ResourceBuilding {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public abstract class ResourceBuilding extends Building {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class ResourceStage extends Stage {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class ResourceStages {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class SaulGoodMine extends ResourceBuilding {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Soldier extends Infantry {
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class Stage {
|
||||
public abstract class Stage implements Serializable {
|
||||
|
||||
protected int dHealth;
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
|
||||
import java.util.List;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Tile {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class VillageHallStages {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
import ca.cosc3p91.a2.util.Time;
|
||||
import ca.cosc3p91.a3.util.Time;
|
||||
|
||||
public class VillageStage extends Stage {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.gameobjects;
|
||||
package ca.cosc3p91.a3.gameobjects;
|
||||
|
||||
public class Worker implements Inhabitant {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package ca.cosc3p91.a2.gameobjects.factory;
|
||||
package ca.cosc3p91.a3.gameobjects.factory;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a2.util.Util;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
import ca.cosc3p91.a3.util.Util;
|
||||
|
||||
public class BuildingFactory {
|
||||
public Building getBuilding(String buildingName) {
|
|
@ -1,7 +1,7 @@
|
|||
package ca.cosc3p91.a2.gameobjects.factory;
|
||||
package ca.cosc3p91.a3.gameobjects.factory;
|
||||
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a2.util.Util;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
import ca.cosc3p91.a3.util.Util;
|
||||
|
||||
public class InhabitantFactory {
|
||||
public Inhabitant getInhabitant(String inhabitantName) {
|
|
@ -0,0 +1,6 @@
|
|||
package ca.cosc3p91.a3.player;
|
||||
|
||||
public class Player {
|
||||
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package ca.cosc3p91.a2.userinterface;
|
||||
package ca.cosc3p91.a3.userinterface;
|
||||
|
||||
import ca.cosc3p91.a2.game.Map;
|
||||
import ca.cosc3p91.a2.gameobjects.Building;
|
||||
import ca.cosc3p91.a2.gameobjects.Inhabitant;
|
||||
import ca.cosc3p91.a2.util.Print;
|
||||
import ca.cosc3p91.a3.game.Map;
|
||||
import ca.cosc3p91.a3.gameobjects.Building;
|
||||
import ca.cosc3p91.a3.gameobjects.Inhabitant;
|
||||
import ca.cosc3p91.a3.util.Print;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
|
@ -1,8 +1,8 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
import ChallengeDecision.*;
|
||||
import ca.cosc3p91.a2.game.Map;
|
||||
import ca.cosc3p91.a2.gameobjects.*;
|
||||
import ca.cosc3p91.a3.game.Map;
|
||||
import ca.cosc3p91.a3.gameobjects.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -1,6 +1,8 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
public class Time {
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Time implements Serializable {
|
||||
|
||||
private long timeSeconds;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.cosc3p91.a2.util;
|
||||
package ca.cosc3p91.a3.util;
|
||||
|
||||
import java.util.Random;
|
||||
|
Loading…
Reference in New Issue