-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCase.php
More file actions
44 lines (36 loc) · 848 Bytes
/
Copy pathCase.php
File metadata and controls
44 lines (36 loc) · 848 Bytes
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
37
38
39
40
41
42
43
44
<?php
// Classe qui définit une case du plateau
class Casse
{
private $caseJoueur; // indique le joueur qui a son pion sur la case (null si vide)
private $coordCaseX; // coordonnée de la case en X (0 >= $coordCaseX >= 4)
private $coordCaseY; // coordonnée de la case en Y (0 >= $coordCaseY >= 4)
// Constructeur
public function __construct ($x, $y)
{
$this -> coordCaseX = $x;
$this -> coordCaseY = $y;
}
public function getCoordCaseX()
{
return $this -> coordCaseX;
}
public function getCoordCaseY()
{
return $this -> coordCaseY;
}
public function setCoordCase($x, $y)
{
$this -> coordCaseX = $x;
$this -> coordCaseY = $y;
}
public function getCaseJoueur()
{
return $this -> caseJoueur;
}
public function setCaseJoueur($j)
{
$this -> caseJoueur = $j;
}
}
?>