Esempio n. 1
0
 public function testShipSunk()
 {
     $ship = new Ship(2);
     $ship->addCoordinate(new Point(1, 2));
     $ship->addCoordinate(new Point(2, 2));
     // Hit Twice;
     $ship->receiveShot(1, 2);
     $ship->receiveShot(2, 2);
     $this->assertTrue($ship->isSunk());
 }