From e9d3afb483eff053d0e53d2f55d9d59cd6d7f29e Mon Sep 17 00:00:00 2001 From: Art4 Date: Sun, 24 Nov 2024 19:51:37 +0000 Subject: [PATCH] Fix errors in tictac addon --- tictac/tictac.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tictac/tictac.php b/tictac/tictac.php index 0f9f4fb6..dc9f0348 100644 --- a/tictac/tictac.php +++ b/tictac/tictac.php @@ -70,6 +70,7 @@ class tictac { private $dimen; private $first_move = true; private $handicap = 0; + private $mefirst; private $yours; private $mine; private $winning_play; @@ -161,10 +162,10 @@ class tictac { ]; - function __construct($dimen,$handicap,$mefirst,$yours,$mine) { + function __construct($dimen, $handicap, $mefirst, $yours, $mine) { $this->dimen = 3; - $this->handicap = (($handicap) ? 1 : 0); - $this->mefirst = (($mefirst) ? 1 : 0); + $this->handicap = $handicap ? 1 : 0; + $this->mefirst = $mefirst ? 1 : 0; $this->yours = str_replace('XXX','',$yours); $this->mine = $mine; $this->you = $this->parse_moves('you'); @@ -175,6 +176,7 @@ class tictac { } function play() { + $o = ''; if($this->first_move) { if(rand(0,1) == 1) {