Example #1
0
 public function testGetTileFromPostionWhenNoTileIsSet()
 {
     $grid = new Grid(1, 1);
     $this->assertNull($grid->getTileFromPosition());
 }
Example #2
0
 /**
  * Constructor
  * Will setup the entire parser and run it automatically
  *
  * @param Game\Request $request
  * @param Game\Response $response
  * @param Game\Grid $grid
  * @param Game\Inventory $personalInventory
  * @return void
  */
 public function __construct(Request $request, Response $response, Grid $grid, Inventory $personalInventory)
 {
     $this->response = $response;
     $this->input = trim($request->getCmd());
     $this->parsedInput = $this->input;
     $this->personalInventory = $personalInventory;
     $this->grid = $grid;
     $this->tile = $grid->getTileFromPosition();
 }