X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tictac%2Ftictac.php;h=08a8c09c7bc1b975688e083924881d6032d34bbb;hb=2429f7eba8b05091ab1dfd6c1c9dc54ca6e5c927;hp=ad0a6077fa640bcf0a061c1869685bbfb364564f;hpb=b303aedd668010f80457cc5b0080a39c8919a09c;p=friendica-addons.git diff --git a/tictac/tictac.php b/tictac/tictac.php index ad0a6077..08a8c09c 100644 --- a/tictac/tictac.php +++ b/tictac/tictac.php @@ -5,9 +5,8 @@ * Version: 1.0 * Author: Mike Macgirvin */ -use Friendica\Core\Addon; use Friendica\Core\Hook; -use Friendica\Core\L10n; +use Friendica\DI; function tictac_install() { Hook::register('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu'); @@ -19,7 +18,7 @@ function tictac_uninstall() { } function tictac_app_menu($a,&$b) { - $b['app_menu'][] = '
' . L10n::t('Three Dimensional Tic-Tac-Toe') . '
'; + $b['app_menu'][] = '
' . DI::l10n()->t('Three Dimensional Tic-Tac-Toe') . '
'; } @@ -52,17 +51,17 @@ function tictac_content(&$a) { $dimen = 3; } - $o .= '

' . L10n::t('3D Tic-Tac-Toe') . '


'; + $o .= '

' . DI::l10n()->t('3D Tic-Tac-Toe') . '


'; $t = new tictac($dimen,$handicap,$mefirst,$yours,$mine); $o .= $t->play(); - $o .= '' . L10n::t('New game') . '
'; - $o .= '' . L10n::t('New game with handicap') . '
'; - $o .= '

' . L10n::t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. '); - $o .= L10n::t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.'); + $o .= '' . DI::l10n()->t('New game') . '
'; + $o .= '' . DI::l10n()->t('New game with handicap') . '
'; + $o .= '

' . DI::l10n()->t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. '); + $o .= DI::l10n()->t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.'); $o .= '

'; - $o .= L10n::t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.'); + $o .= DI::l10n()->t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.'); $o .= '

'; return $o; @@ -181,24 +180,24 @@ class tictac { if($this->first_move) { if(rand(0,1) == 1) { - $o .= '
' . L10n::t('You go first...') . '

'; + $o .= '
' . DI::l10n()->t('You go first...') . '

'; $this->mefirst = 0; $o .= $this->draw_board(); return $o; } - $o .= '
' . L10n::t('I\'m going first this time...') . '

'; + $o .= '
' . DI::l10n()->t('I\'m going first this time...') . '

'; $this->mefirst = 1; } if($this->check_youwin()) { - $o .= '
' . L10n::t('You won!') . '

'; + $o .= '
' . DI::l10n()->t('You won!') . '

'; $o .= $this->draw_board(); return $o; } if($this->fullboard()) - $o .= '
' . L10n::t('"Cat" game!') . '

'; + $o .= '
' . DI::l10n()->t('"Cat" game!') . '

'; $move = $this->winning_move(); if(strlen($move)) { @@ -221,9 +220,9 @@ class tictac { } if($this->check_iwon()) - $o .= '
' . L10n::t('I won!') . '

'; + $o .= '
' . DI::l10n()->t('I won!') . '

'; if($this->fullboard()) - $o .= '
' . L10n::t('"Cat" game!') . '

'; + $o .= '
' . DI::l10n()->t('"Cat" game!') . '

'; $o .= $this->draw_board(); return $o; }