-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix code smells in BaseTowerConfigs: set private fields + add getters
- Loading branch information
1 parent
bf99946
commit ce87c1b
Showing
4 changed files
with
119 additions
and
32 deletions.
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
source/core/src/main/com/csse3200/game/entities/configs/BaseTowerConfigs.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package com.csse3200.game.entities.configs; | ||
|
||
/** | ||
* Defines all tower configs to be loaded by the Tower Factory. | ||
*/ | ||
public class BaseTowerConfigs { | ||
private WeaponTowerConfig weapon = new WeaponTowerConfig(); | ||
private WallTowerConfig wall = new WallTowerConfig(); | ||
private IncomeTowerConfig income = new IncomeTowerConfig(); | ||
private FireTowerConfig fireTower = new FireTowerConfig(); | ||
private StunTowerConfig stunTower = new StunTowerConfig(); | ||
private TNTTowerConfigs TNTTower = new TNTTowerConfigs(); | ||
private DroidTowerConfig DroidTower = new DroidTowerConfig(); | ||
private FireworksTowerConfig fireworksTower = new FireworksTowerConfig(); | ||
private PierceTowerConfig pierceTower = new PierceTowerConfig(); | ||
private RicochetTowerConfig ricochetTower = new RicochetTowerConfig(); | ||
private HealTowerConfig healTower = new HealTowerConfig(); | ||
|
||
/** | ||
* Function for getting the wall tower's config | ||
* @return The config of wall tower | ||
*/ | ||
public WallTowerConfig getWall() { | ||
return wall; | ||
} | ||
|
||
/** | ||
* Function for getting the weapon tower's config | ||
* @return The config of weapon tower | ||
*/ | ||
public WeaponTowerConfig getWeapon() { | ||
return weapon; | ||
} | ||
|
||
/** | ||
* Function for getting the income tower's config | ||
* @return The config of income tower | ||
*/ | ||
public IncomeTowerConfig getIncome() { | ||
return income; | ||
} | ||
|
||
/** | ||
* Function for getting the fire tower's config | ||
* @return The config of fire tower | ||
*/ | ||
public FireTowerConfig getFireTower() { | ||
return fireTower; | ||
} | ||
|
||
/** | ||
* Function for getting the stun tower's config | ||
* @return The config of stun tower | ||
*/ | ||
public StunTowerConfig getStunTower() { | ||
return stunTower; | ||
} | ||
|
||
/** | ||
* Function for getting the TNT tower's config | ||
* @return The config of TNT tower */ | ||
public TNTTowerConfigs getTNTTower() { | ||
return TNTTower; | ||
} | ||
|
||
/** | ||
* Function for getting the droid tower's config | ||
* @return The config of droid tower | ||
*/ | ||
public DroidTowerConfig getDroidTower() { | ||
return DroidTower; | ||
} | ||
|
||
/** | ||
* Function for getting the fireworks tower's config | ||
* @return The config of fireworks tower | ||
*/ | ||
public FireworksTowerConfig getFireworksTower() { | ||
return fireworksTower; | ||
} | ||
|
||
/** | ||
* Function for getting the pierce tower's config | ||
* @return The config of pierce tower | ||
*/ | ||
public PierceTowerConfig getPierceTower() { | ||
return pierceTower; | ||
} | ||
|
||
/** | ||
* Function for getting the ricochet tower's config | ||
* @return The config of ricochet tower | ||
*/ | ||
public RicochetTowerConfig getRicochetTower() { | ||
return ricochetTower; | ||
} | ||
|
||
/** | ||
* Function for getting the heal tower's config | ||
* @return The config of heal tower | ||
*/ | ||
public HealTowerConfig getHealTower() { | ||
return healTower; | ||
} | ||
} |
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
18 changes: 0 additions & 18 deletions
18
source/core/src/main/com/csse3200/game/entities/configs/baseTowerConfigs.java
This file was deleted.
Oops, something went wrong.
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