-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.php
41 lines (32 loc) · 918 Bytes
/
create.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
<?php
require_once 'witcher.php';
include_once 'creature.php';
include_once 'eliksir.php';
session_start();
$speed = $_POST['speed'];
$str = $_POST['str'];
$agi = $_POST['agi'];
$live = $_POST['live'];
$p = '<p>';
$o = '</p>';
$witcher = new witcher($speed, $str, $agi, $live, $live);
$speedCrt = $_POST['speedCrt'];
$strCrt = $_POST['strCrt'];
$agiCrt = $_POST['agiCrt'];
$liveCrt = $_POST['liveCrt'];
$monster = new creature($speedCrt, $strCrt, $agiCrt, $liveCrt, $liveCrt);
echo $p . 'Witcher: ' . $o ; //. 'Potwór: <br>'. $monster->stats() ;
$witcher->stats();
echo $p . 'Potwor: ' .$o;
$monster->stats();
$_SESSION['witcher'] = serialize($witcher);
$_SESSION['monster'] = serialize($monster);
static $count = 0;
$_SESSION['count'] = serialize($count);
$_SESSION['eliksir'] = serialize(new eliksir(null, null));
?>
<form action="game.php" >
<button type="submit" >
Play
</button>
</form>