Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GalaxyTrucker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Leonard Haddad
GalaxyTrucker
Commits
4511092b
Commit
4511092b
authored
4 years ago
by
Fabian
Browse files
Options
Downloads
Patches
Plain Diff
Attack function
parent
b082e674
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Attack.java
+21
-0
21 additions, 0 deletions
...cker/galaxytruckerreloaded/Controller/Actions/Attack.java
with
21 additions
and
0 deletions
core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Attack.java
+
21
−
0
View file @
4511092b
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
){}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment