From 41a764d70fbcdfd11e22ad5e02d6dbdb94a574a8 Mon Sep 17 00:00:00 2001 From: Alf Magne Kalleland Date: Sun, 3 Feb 2013 20:48:27 +0100 Subject: [PATCH] Use string concat instead of implode in parser --- FenParser0x88.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/FenParser0x88.php b/FenParser0x88.php index b38142f..b33e331 100644 --- a/FenParser0x88.php +++ b/FenParser0x88.php @@ -1353,16 +1353,13 @@ class FenParser0x88 function setNewFen() { - $board = $this->cache['board']; $fen = ''; $emptyCounter = 0; for ($rank = 7; $rank >= 0; $rank--) { - for ($file = 0; $file < 8; $file++) { $index = ($rank * 8) + $file; - if ($board[Board0x88Config::$numericMapping[$index]]) { if ($emptyCounter) { $fen .= $emptyCounter; @@ -1385,8 +1382,7 @@ class FenParser0x88 if ($emptyCounter) { $fen .= $emptyCounter; } - - return implode(" ", array($fen, $this->getColorCode(), $this->getCastle(), $this->fenParts['enPassant'], $this->getHalfMoves(), $this->getFullMoves())); + return $fen . " ". $this->getColorCode(). " ". $this->getCastle()." ". $this->fenParts['enPassant']." ". $this->getHalfMoves()." ". $this->getFullMoves(); } }