/** * Process the consequences of hit a ship * * @param integer $yPosition * @param integer $xPosition */ protected function hitAShipt($yPosition, $xPosition) { $this->battlefield->markPositionAsHit($yPosition, $xPosition); if (true === $this->battlefield->isShipSunk()) { $this->flashMessage->notifySunk(); } else { $this->flashMessage->notifyHit(); } }