Michael Boeyens 3 лет назад
Родитель
Сommit
c8f9a481e2
2 измененных файлов: 0 добавлений и 16 удалений
  1. 0
    15
      gameclass.inc
  2. 0
    1
      gamefunction.inc

+ 0
- 15
gameclass.inc Просмотреть файл

@@ -2,20 +2,6 @@
require_once "dbase.inc";
class game
{
/* work with gamestates:
- gamestate 0: set difficulty
--> difficultyform
- gamestate 1: play game
--> startup game
==> create ships
==> set ammo
--> shotForm
==> submitbutton value
--> showShotsLeft
- gamestate 2: game finished
--> finish off game
--> submitbutton value
*/

//properties
protected $shipList = ['duikboot', 'torpedojager', 'kruiser', 'slagschip', 'vliegdekship'];
@@ -28,7 +14,6 @@ class game
public $ships;

//methods
//start instance class?
protected function setDifficulty()
{
if (isset($_POST['difficulty']) && $_POST['difficulty'] != "") {

+ 0
- 1
gamefunction.inc Просмотреть файл

@@ -72,7 +72,6 @@ function runGame()
} elseif (isset($_POST["shot"])) {
$_SESSION["game"]->hitCheck();
} elseif (isset($_SESSION["game"]) && $_SESSION["game"]->gameResult) {
//gameresult still set to protected
$_SESSION["game"]->saveResult();
unset($_SESSION["game"]);
}

Загрузка…
Отмена
Сохранить