Adefinir  1
GameDesigner.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models\Metiers;
3 
5 
6 class GameDesigner {
7 
8  // Nombre d'employé actuellement embauchés
9  private int $_nbEmployees = 0;
10 
11  // ====================================================================
12 
13  //Construct
14  public function _construct() {
15  $this->_nbEmployees = 0;
16  }
17 
25  public function workOnDesign( Employes $employees) {
26  $employees->incrementActionResults( "design", $this->_nbEmployees );
27  }
28 
36  public function workOnScenario( Employes $employees ) {
37  $employees->incrementActionResults( "scenario", $this->_nbEmployees );
38  }
39 
47  public function workOnDifficulty( Employes $employees ){
48  $employees->incrementActionResults( "difficulty", $this->_nbEmployees );
49  }
50 
58  public function hireGameDesigner() : int {
59  $this->_nbEmployees += 1;
60  return $this->_nbEmployees;
61  }
62 
70  public function fireGameDesigner() : int {
71  if ($this->_nbEmployees != 0){
72  $this->_nbEmployees = $this->_nbEmployees - 1;
73  }
74  return $this->_nbEmployees;
75  }
76 }
App\Models\Metiers\GameDesigner
Definition: GameDesigner.php:6
App\Models\Employes
Definition: Employes.php:24
App\Models\Metiers\GameDesigner\workOnScenario
workOnScenario(Employes $employees)
Definition: GameDesigner.php:36
App\Models\Employes\incrementActionResults
incrementActionResults(string $varName, int $increment)
Definition: Employes.php:196
App\Models\Metiers
Definition: Developpeur.php:2
App\Models\Metiers\GameDesigner\fireGameDesigner
fireGameDesigner()
Definition: GameDesigner.php:70
App\Models\Metiers\GameDesigner\_construct
_construct()
Definition: GameDesigner.php:14
App\Models\Metiers\GameDesigner\workOnDifficulty
workOnDifficulty(Employes $employees)
Definition: GameDesigner.php:47
App\Models\Metiers\GameDesigner\workOnDesign
workOnDesign(Employes $employees)
Definition: GameDesigner.php:25
App\Models\Metiers\GameDesigner\hireGameDesigner
hireGameDesigner()
Definition: GameDesigner.php:58