mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-23 01:40:15 +00:00
fix errors in tictac addon
This commit is contained in:
parent
8e778593ca
commit
2f89827dea
1 changed files with 9 additions and 6 deletions
|
@ -7,7 +7,6 @@
|
||||||
* Status: unsupported
|
* Status: unsupported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
|
||||||
|
@ -31,6 +30,11 @@ function tictac_module() {}
|
||||||
function tictac_content() {
|
function tictac_content() {
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
$dimen = 3;
|
||||||
|
$handicap = 0;
|
||||||
|
$mefirst = 0;
|
||||||
|
$yours = '';
|
||||||
|
$mine = '';
|
||||||
|
|
||||||
if($_POST['move']) {
|
if($_POST['move']) {
|
||||||
$handicap = DI::args()->get(1);
|
$handicap = DI::args()->get(1);
|
||||||
|
@ -45,9 +49,6 @@ function tictac_content() {
|
||||||
$handicap = DI::args()->get(1);
|
$handicap = DI::args()->get(1);
|
||||||
$dimen = 3;
|
$dimen = 3;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$dimen = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
$o .= '<h3>' . DI::l10n()->t('3D Tic-Tac-Toe') . '</h3><br />';
|
$o .= '<h3>' . DI::l10n()->t('3D Tic-Tac-Toe') . '</h3><br />';
|
||||||
|
|
||||||
|
@ -163,7 +164,7 @@ class tictac {
|
||||||
];
|
];
|
||||||
|
|
||||||
function __construct($dimen, $handicap, $mefirst, $yours, $mine) {
|
function __construct($dimen, $handicap, $mefirst, $yours, $mine) {
|
||||||
$this->dimen = 3;
|
$this->dimen = $dimen;
|
||||||
$this->handicap = $handicap ? 1 : 0;
|
$this->handicap = $handicap ? 1 : 0;
|
||||||
$this->mefirst = $mefirst ? 1 : 0;
|
$this->mefirst = $mefirst ? 1 : 0;
|
||||||
$this->yours = str_replace('XXX','',$yours);
|
$this->yours = str_replace('XXX','',$yours);
|
||||||
|
@ -228,6 +229,8 @@ class tictac {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_moves($player) {
|
function parse_moves($player) {
|
||||||
|
$str = '';
|
||||||
|
|
||||||
if($player == 'me')
|
if($player == 'me')
|
||||||
$str = $this->mine;
|
$str = $this->mine;
|
||||||
if($player == 'you')
|
if($player == 'you')
|
||||||
|
|
Loading…
Reference in a new issue