blob: 35a7e18d812151e1d8c270c63fee84cf48258de4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
/**
* Sends all data from previous session on page load.
*
* @package inc\craftmine.inc
* @author Alexandre Renoux
* @author Pierre-Emmanuel Novac
*/
require_once("mine.inc");
require_once("shop.inc");
require_once("dungeon.inc");
require_once("perso.inc");
/**
* Sends all data from previous session on page load.
* All data from the different modules are packed in an array.
*
* @return void
*/
function sendCraftMine() {
$data = array("gold" => sendMine(),
"shop" => sendShop(),
"inventory" => Inventory::sendContent(),
"miners" => sendMiners(),
"dungeon" => sendDungeon(),
"perso" => sendPerso(),
);
echo json_encode($data);
}
function resetGame() {
$_SESSION = array();
}
?>
|