public function it_should_allow_multiple_santas_and_multiple_directions(Santa $santa, Santa $roboSanta) { $this->beConstructedWith([$santa, $roboSanta]); $santa->moveWest()->shouldBeCalled(); $santa->moveEast()->shouldBeCalled(); $roboSanta->moveNorth()->shouldBeCalled(); $roboSanta->moveSouth()->shouldBeCalled(); $this->readDirections('<^>v'); }
public function it_can_calculate_unique_houses_delivered_to_from_both_santas(Santa $santa, Santa $robosanta) { $santa->getHousesDeliveredTo()->willReturn([[0, 0], [1, 0], [1, 1]]); $robosanta->getHousesDeliveredTo()->willReturn([[0, 0], [0, 1], [1, 1]]); $this->getNumberOfUniqueHousesDeliveredTo()->shouldBe(4); }
public function it_can_translate_multiple_instructions(Santa $santa) { $santa->moveWest()->shouldBeCalledTimes(3); $santa->moveNorth()->shouldBeCalledTimes(4); $this->parse("<^^<<^^"); }