-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (35 loc) · 953 Bytes
/
index.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
39
40
41
42
<?php
include('./config.php');
$solitary = new Solitary(52);
if(isset($_REQUEST['random'])) {
$solitary->create_random_game();
}
//file_put_contents('demo2.dat', serialize($solitary));
//$solitary->TInit = unserialize(file_get_contents('save/2013-09-20 16:55:48.sol'));
//$solitary->reset_init_position();
//$solitary->get_solution();
//$solitary->reset_init_position();
//pre($solitary->TBoard);
$board = new TTemplateTBS();
echo $board->render(
'tpl/board.tpl.php'
, array(
'deck' => $solitary->TDeck
,'discard' => $solitary->TDiscard
,'aces_hearts' => $solitary->TAces['hearts']
,'aces_diams' => $solitary->TAces['diams']
,'aces_clubs' => $solitary->TAces['clubs']
,'aces_spades' => $solitary->TAces['spades']
,'board' => $solitary->TBoard
,'path' => $solitary->bestPath
,'allcards' => $solitary->TCard
)
, array(
'data' => array(
'score' => $solitary->bestScore
)
,'view' => array(
'http' => HTTP
)
)
);