11 use App\Http\Controllers\GameController;
20 if( !empty( $_POST[
"function"] ) ) {
21 $function = $_POST[
"function"];
56 protected static function hireORfire(
string $hORf,
string $jobName ) : int {
58 $game = $_SESSION[
"gameController"];
62 $res = $game->hire($jobName);
64 else if ( $hORf ==
false ) {
65 $res = $game->fire($jobName);
72 protected static function actions( $post ) {
74 foreach($post as $key => $value) {
75 if( strval($key) ==
"actions" ) {
76 $actions = json_decode($post[$key]);
80 $nbDaysLeft = $_SESSION[
"gameController"]->nbDay($actions);