1 package se
.umu
.cs
.dit06ajnajs
;
3 import java
.awt
.Dimension
;
6 import java
.util
.ArrayList
;
8 import se
.umu
.cs
.dit06ajnajs
.agent
.Agent
;
9 import se
.umu
.cs
.dit06ajnajs
.agent
.Tower
;
10 import se
.umu
.cs
.dit06ajnajs
.map
.Map
;
11 import se
.umu
.cs
.dit06ajnajs
.map
.MapBuilder
;
12 import se
.umu
.cs
.dit06ajnajs
.map
.TowerSquare
;
14 public class ATDModel
{
20 public ATDModel(List
<Map
> maps
) {
21 this.agents
= new ArrayList
<Agent
>();
23 this.currentMap
= maps
.get(0); //MapBuilder.createMap();
26 public void addTower(Tower t
) {
27 TowerSquare square
= currentMap
.getRandomFreeTowerSquare();
29 Point p
= square
.getPosition();
34 System
.out
.println("No available towersquares");
38 public void addAgent(Agent agent
) {
39 // TODO Auto-generated method stub
43 public List
<Agent
> getAgents() {
44 // TODO Auto-generated method stub
49 return this.currentMap
;
52 public Image
getMapImage() {
53 return currentMap
.getMapImage();
56 public Dimension
getMapDimension() {
57 return currentMap
.getDimension();