forked from jstar88/opbe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
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
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
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,70 @@ | ||
<?php | ||
|
||
class MoonsLangImplementation implements Lang | ||
{ | ||
private $lang; | ||
public function __construct() | ||
{ | ||
require (OPBEPATH . "tests/runnable/langs/2Moons_1-3-5.php"); | ||
$this->lang = $lang; | ||
} | ||
|
||
public function getShipName($id) | ||
{ | ||
return $this->lang['tech'][$id]; | ||
} | ||
public function getAttackersAttackingDescr($amount, $damage) | ||
{ | ||
return "The attacking fleet fires a total of " . $amount . ' times with the power of ' . $damage . " upon the defender.<br />"; | ||
} | ||
public function getDefendersDefendingDescr($damage) | ||
{ | ||
return "The defender's shields absorb " . $damage . " damage points.<br />"; | ||
} | ||
public function getDefendersAttackingDescr($amount, $damage) | ||
{ | ||
return "The defending fleet fires a total of " . $amount . ' times with the power of ' . $damage . " upon the attacker.<br />"; | ||
} | ||
public function getAttackersDefendingDescr($damage) | ||
{ | ||
return "The attacker's shields absorb " . $damage . " damage points.<br />"; | ||
} | ||
public function getAttackerHasWon() | ||
{ | ||
return "The attacker has won the battle."; | ||
} | ||
public function getDefendersHasWon() | ||
{ | ||
return "The defender has won the battle."; | ||
} | ||
public function getDraw() | ||
{ | ||
return "The battle ended in a draw."; | ||
} | ||
public function getStoleDescr($metal, $crystal, $deuterium) | ||
{ | ||
return "He captured<br> $metal metal, $crystal and $deuterium deuterium."; | ||
} | ||
public function getAttackersLostUnits($units) | ||
{ | ||
return "The attacker lost a total of $units units."; | ||
} | ||
public function getDefendersLostUnits($units) | ||
{ | ||
return "The defender lost a total of $units units."; | ||
} | ||
public function getFloatingDebris($metal, $crystal) | ||
{ | ||
return "At these space coordinates now float $metal metal and $crystal crystal."; | ||
} | ||
public function getMoonProb($prob) | ||
{ | ||
return "The probability that a moon emerge from the rubble is $prob% ."; | ||
} | ||
public function getNewMoon() | ||
{ | ||
return "The huge amount of metal and glass are functioning and form a lunar satellite in orbit the planet."; | ||
} | ||
} | ||
|
||
?> |
11 changes: 5 additions & 6 deletions
11
tests/LangImplementation.php → ...s/runnable/langs/XGLangImplementation.php
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