diff --git a/demo.php b/demo.php index e6132ea..e1aa05d 100644 --- a/demo.php +++ b/demo.php @@ -43,7 +43,7 @@ - Debug: + Colors: /> Big blocks?: diff --git a/index.php b/index.php index f3cd677..439c013 100644 --- a/index.php +++ b/index.php @@ -43,12 +43,6 @@
  • Demo XML output
  • -

    Source

    - - -

    Features

    +

    TODO

    + + + +
    © Laurynas Butkus (laurynas.butkus at gmail.com), 2005 - + \ No newline at end of file diff --git a/init.php b/init.php index 1e190df..97ca552 100644 --- a/init.php +++ b/init.php @@ -14,7 +14,7 @@ $max_tries = (int)$_REQUEST['max_tries'] ? (int)$_REQUEST['max_tries'] : 10; $groupid = !empty($_REQUEST['groupid']) ? $_REQUEST['groupid'] : 'demo'; -$pc =& new PHP_Crossword($rows, $cols); +$pc = new PHP_Crossword($rows, $cols); $pc->setGroupID($groupid); $pc->setMaxWords($max_words); diff --git a/lib/php_crossword.class.php b/lib/php_crossword.class.php index 1ea0df7..88a15ca 100644 --- a/lib/php_crossword.class.php +++ b/lib/php_crossword.class.php @@ -69,7 +69,7 @@ function PHP_Crossword($rows = 15, $cols = 15) $this->cols = (int)$cols; // connect to the database - $this->db =& new MySQL; + $this->db = new MySQL; } /** @@ -811,4 +811,4 @@ function generateFromWords($words_list) } } -?> +?> \ No newline at end of file diff --git a/lib/php_crossword_client.class.php b/lib/php_crossword_client.class.php index bb910f9..3f7b80b 100644 --- a/lib/php_crossword_client.class.php +++ b/lib/php_crossword_client.class.php @@ -243,7 +243,7 @@ function __getXML_Direct() require_once 'lib/mysql.class.php'; require_once 'lib/php_crossword.class.php'; - $pc =& new PHP_Crossword($this->cols, $this->rows); + $pc = new PHP_Crossword($this->cols, $this->rows); $pc->setGroupID($this->groupid); $pc->setMaxWords($this->words); diff --git a/lib/php_crossword_grid.class.php b/lib/php_crossword_grid.class.php index 5614ae0..8945826 100644 --- a/lib/php_crossword_grid.class.php +++ b/lib/php_crossword_grid.class.php @@ -58,7 +58,7 @@ function __initCells() { for ($y = 0; $y < $this->rows; $y++) for ($x = 0; $x < $this->cols; $x++) - $this->cells[$x][$y] =& new PHP_Crossword_Cell($x, $y); + $this->cells[$x][$y] = new PHP_Crossword_Cell($x, $y); } /** @@ -102,7 +102,7 @@ function &getRandomWord() */ function placeWord($word, $x, $y, $axis) { - $w =& new PHP_Crossword_Word($word, $axis, $this->cells[$x][$y]); + $w = new PHP_Crossword_Word($word, $axis, $this->cells[$x][$y]); ++$this->inum; // sandy addition ++$this->maxinum; // sandy addition @@ -118,13 +118,11 @@ function placeWord($word, $x, $y, $axis) { $s = $x; $c =& $cx; - $t =& $cy; } else { $s = $y; $c =& $cy; - $t =& $cx; } // dump( "PLACING WORD: $cx x $cy - {$w->word}" ); @@ -141,21 +139,15 @@ function placeWord($word, $x, $y, $axis) // disable cell before first cell $c = $s - 1; if ($c >= 0 ) - $this->cells[$cx][$cy]->setCanCross(PC_AXIS_BOTH, FALSE); + $this->cells[$cx][$cy]->setCanCross(PC_AXIS_BOTH, FALSE); $this->cells[$cx][$cy]->number = $w->inum; // sandy addition - // disable cell after last cell + // disable cell after first cell $c = $s + strlen($word); if (is_object($this->cells[$cx][$cy])) - $this->cells[$cx][$cy]->setCanCross(PC_AXIS_BOTH, FALSE); + $this->cells[$cx][$cy]->setCanCross(PC_AXIS_BOTH, FALSE); - // avoid starting "corner word" - which would use the same - // number cell as this word - $c = $s - 1; - $t = $t + 1; - if ($c >= 0 && is_object($this->cells[$cx][$cy])) - $this->cells[$cx][$cy]->setCanCross(PC_AXIS_BOTH, FALSE); } /** @@ -395,4 +387,4 @@ function getHTML($params = array()) return $html; } } -?> +?> \ No newline at end of file