11 use App\Http\Controllers\GameController;
29 if( !empty( $_POST[
"function"] ) ) {
30 $function = $_POST[
"function"];
70 protected static function hireORfire(
string $hORf,
string $jobName ) : int {
72 $game = $_SESSION[
"gameController"];
76 $res =
$game->hire($jobName);
78 else if ( $hORf ==
false ) {
79 $res =
$game->fire($jobName);
98 protected static function actions( $post ) {
100 foreach($post as $key => $value) {
101 if( strval($key) ==
"actions" ) {
102 $actions = json_decode($post[$key]);
106 $nbDaysLeft = $_SESSION[
"gameController"]->nbDay($actions);
122 $nbDaysLeft = $_SESSION[
"gameController"]->substractDay();