function it_can_not_locate_ship_cause_selected_bad_field(Ship $ship, Map $map, MapRepository $mapRepository)
 {
     $mapRepository->findOneBy(['player' => 1], ['id' => 'DESC'])->willReturn(['E', 2]);
     //        $map->getXAxis()->willReturn('R');
     //        $map->getYAxis()->willReturn('2');
     //        $this->itSatisfiedBy($map)->shouldReturn(false);
 }
 function it_can_locate(ShipRepository $shipRepository, MapRepository $mapRepository, ShipCanBeLocated $shipCanBeLocated, Ship $ship, Map $map)
 {
     $shipCanBeLocated->itSatisfiedBy($map)->willReturn(true);
     $shipRepository->save($ship)->shouldBeCalled();
     $mapRepository->save($map)->shouldBeCalled();
     $this->locate($map, $ship);
 }
 function it_should_commit_shot_to_computer(GetTarget $getTarget, MapRepository $mapRepository, Map $map, $dispatcher)
 {
     $dispatcher->dispatch(ShotCommitted::NAME, Argument::type('ShipsBattle\\Domain\\Event\\ShotCommitted'))->shouldBeCalled();
     $getTarget->get()->shouldNotBeCalled();
     $mapRepository->update()->shouldBeCalled();
     $this->commit(1, $map);
 }
 function it_can_get_target(MapRepository $mapRepository)
 {
     $mapRepository->getAllTargets()->shouldBeCalled();
     $this->get();
 }