diff options
Diffstat (limited to 'inc/account.inc')
-rw-r--r-- | inc/account.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/inc/account.inc b/inc/account.inc index 6f398bb..f7e3c05 100644 --- a/inc/account.inc +++ b/inc/account.inc @@ -1,6 +1,20 @@ <?php +/** + * Manages player's account: debit and credit. + * + * @package inc\account.inc + * @author Alexandre Renoux + * @author Pierre-Emmanuel Novac + */ + require_once("messages.inc"); +/** + * Debits the account of a certain amount of gold. + * + * @param int $amount amount to debit + * @return boolean true if player had enough gold, false otherwise + */ function debitAccount($amount) { if($_SESSION["mine"]["gold"] < $amount) { sendError("gold_insufficient"); @@ -10,6 +24,12 @@ function debitAccount($amount) { return true; } +/** + * Credits the account of a certain amount of gold. + * + * @param int $amount amount to credit + * @return void + */ function creditAccount($amount) { $_SESSION["mine"]["gold"] += $amount; } |