-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboard.php
More file actions
48 lines (36 loc) · 911 Bytes
/
board.php
File metadata and controls
48 lines (36 loc) · 911 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
45
46
47
<?php
//taille tableau possible 4x4, 4x7, 4x9
//max 18 fruits
class Fruits {
protected $array;
function __construct(){
$this->array = [
['fruit' => 'pomme'],
['fruit' => 'banane'],
['fruit' => 'peche'],
['fruit' => 'citronvert'],
['fruit' => 'grenadine'],
['fruit' => 'abricot'],
['fruit' => 'citronjaune'],
['fruit' => 'fraise'],
/* ['fruit' => 'pommeverte'],
['fruit' => 'kaki'],
['fruit' => 'raisin'],
['fruit' => 'pasteque'],
['fruit' => 'prune'],
['fruit' => 'poire'],
['fruit' => 'cerise'],
['fruit' => 'framboise'],
['fruit' => 'mangue'],
['fruit' => 'mirabelle'],*/
];
$this->array = array_merge($this->array,$this->array);
}
function send(){
$this->melanger();
echo json_encode($this->array);
}
function melanger(){
shuffle($this->array);
}
}