Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
TowerDefense/src/model/MapTowerDefense.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
55 lines (42 sloc)
920 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package model; | |
import view.MockGui; | |
import view.StatGui; | |
public class MapTowerDefense { | |
private int maxTowers; | |
private int numNodes; | |
private int[][] nodes; | |
private MinionFactory MF; | |
public TowerFactory TF; | |
private MockGui MG; | |
private StatGui SG; | |
public MapTowerDefense(int _maxTowers, int _numNodes, int[][] _nodes, MockGui _mg, StatGui _sg) { | |
maxTowers = _maxTowers; | |
numNodes = _numNodes; | |
nodes = _nodes; | |
MF = new MinionFactory(nodes[0][0], nodes[0][1], this); | |
TF = new TowerFactory(this, maxTowers); | |
MG = _mg; | |
SG = _sg; | |
} | |
public MinionFactory getMF() { | |
return MF; | |
} | |
public TowerFactory getTF() { | |
return TF; | |
} | |
public int getNum() { | |
return numNodes; | |
} | |
public int[][] getNodes() { | |
return nodes; | |
} | |
public MockGui getGui() { | |
return MG; | |
} | |
public StatGui getStatGui(){ | |
return SG; | |
} | |
public void createMinion(MinionTypes type) { | |
MF.createMinion(type); | |
} | |
} |