Skip to content

Commit

Permalink
fix property names
Browse files Browse the repository at this point in the history
  • Loading branch information
iannsp committed Feb 4, 2015
1 parent 7bd256d commit e5d9481
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Iannsp/PhpWar/Player/P2.php
Expand Up @@ -9,8 +9,8 @@ class P2 implements playerInterface
{
private $arenaWidth = 0;
private $arenaHeight = 0;
private $lasw = 0;
private $lasH = 0;
private $lastW = 0;
private $lastH = 0;

public function __construct(Cartesian\Point $limits)
{
Expand All @@ -22,13 +22,13 @@ public function play()

$arenaHeight = $this->arenaHeight;
$arenaWidth = $this->arenaWidth;
$h = $this->lasH ;
$this->lasW = $this->lasW +1;
$w = $this->lasW;
if ($this->lasW == $arenaHeight)
$h = $this->lastH;
$this->lastW = $this->lastW +1;
$w = $this->lastW;
if ($this->lastW == $arenaHeight)
{
$this->lasH++;
$this->lasW = 0;
$this->lastH++;
$this->lastW = 0;
}
return new move($h, $w);
}
Expand Down

0 comments on commit e5d9481

Please sign in to comment.