Skip to content
Snippets Groups Projects
Commit 6cd1a002 authored by Fabian's avatar Fabian
Browse files

Battle Controller

parent 92558bad
No related branches found
No related tags found
No related merge requests found
package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions;
import com.galaxytrucker.galaxytruckerreloaded.Model.Ship;
import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon;
public class Attack {
/** Make one ship attack another's section
* @param opponent - the opponent's ship
* @param weapon - the weapon attacking */
private void attack(Ship opponent, Weapon weapon){}
/** Heal a ship
* @param ship - the ship to heal
* @param healingWeapon - the healing weapon */
private void heal(Ship ship,Weapon healingWeapon){}
/** Flee a fight, reward the winner
* @param coward - the ship that wants to flee
* @param opponent - the opponent that wins the fight */
private void fleeFight(Ship coward, Ship opponent){}
/** Give winner reward and end the fight (or the game)
* @param loser - the ship that lost
* @param victor - the ship that won */
private void endFight(Ship loser, Ship victor){}
}
package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions;
import com.galaxytrucker.galaxytruckerreloaded.Model.Ship;
import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon;
import lombok.*;
@Getter
@Setter
@RequiredArgsConstructor(access = AccessLevel.PUBLIC)
public class BattleController extends Controller{
@NonNull
private Ship myself;
/** Make one ship attack another's section
* @param opponent - the opponent's ship
* @param weapon - the weapon attacking */
private void attack(Ship opponent, Weapon weapon){}
/** Heal a ship
* @param healingWeapon - the healing weapon */
private void heal(Weapon healingWeapon){}
/** Flee a fight, reward the winner
* @param coward - the ship that wants to flee
* @param opponent - the opponent that wins the fight */
private void fleeFight(Ship coward, Ship opponent){}
}
package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions;
import lombok.NonNull;
public abstract class Controller {
/** ClientControllerCommunicator */
@NonNull
private ClientControllerCommunicator clientControllerCommunicator;
// Extend me
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment