-
Notifications
You must be signed in to change notification settings - Fork 0
/
exec.php
38 lines (36 loc) · 969 Bytes
/
exec.php
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
<?php
class Exec {
public function go() {
$players = [
// new Player('Qwirky'),
// new Player('Kwirkster'),
// new Player('Mr. Three'),
new Player('bakert'),
new Player('Syl'),
new Player('Fra')
];
$game = new Game($players, unserialize(TestGames::FIRST));
$game->go();
exit;
$players = [
// new Player('Qwirky'),
// new Player('Kwirkster'),
// new Player('Mr. Three'),
new CautiousPlayer('bakert'),
new CautiousPlayer('Syl'),
new Player('Fra')
];
$totals = [];
for ($i = 0; $i < 100; $i++) {
$game = new Game($players/*, unserialize(TestGames::FIRST)*/);
$game->go();
foreach ($game->scores()->scores() as $score) {
if (!isset($totals[(string)$score->player()])) {
$totals[(string)$score->player()] = 0;
}
$totals[(string)$score->player()] += $score->score();
}
print_r($totals);
}
}
}