Present final version functionality

master
Peter Babič 8 years ago
parent 525ad4fcc2
commit c0e4ce671d
Signed by: peter.babic
GPG Key ID: 4BB075BC1884BA40
  1. 374
      .idea/workspace.xml
  2. 12
      index.php
  3. 30
      src/Coffee/Queue.php
  4. 43
      src/Coffee/Stack.php
  5. 130
      src/Coffee/Table.php
  6. 18
      tests/Coffee/QueueTest.php
  7. 27
      tests/Coffee/StackTest.php
  8. 71
      tests/Coffee/TableTest.php

@ -4,10 +4,9 @@
<option name="ANALYZE_TEST_SOURCES" value="false" />
</component>
<component name="ChangeListManager">
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Rework Spot number">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/Coffee/Queue.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/tests/Coffee/QueueTest.php" />
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Present final version functionality">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Table.php" afterPath="$PROJECT_DIR$/src/Coffee/Table.php" />
</list>
<ignored path="coffeetable.iws" />
<ignored path=".idea/workspace.xml" />
@ -32,42 +31,42 @@
<favorites_list name="coffeetable" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<leaf>
<file leaf-file-name="index.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1224">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<state relative-caret-position="433">
<caret line="85" column="1" selection-start-line="85" selection-start-column="1" selection-end-line="85" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Map.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<file leaf-file-name="Table.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="3" selection-start-line="8" selection-start-column="3" selection-end-line="8" selection-end-column="3" />
<state relative-caret-position="54">
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="TileTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<file leaf-file-name="Stack.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Stack.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<state relative-caret-position="129">
<caret line="25" column="32" selection-start-line="25" selection-start-column="32" selection-end-line="25" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SpotTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<file leaf-file-name="StackTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/StackTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="504">
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
<state relative-caret-position="324">
<caret line="18" column="40" selection-start-line="18" selection-start-column="40" selection-end-line="18" selection-end-column="40" />
<folding />
</state>
</provider>
@ -76,8 +75,8 @@
<file leaf-file-name="Spot.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<state relative-caret-position="468">
<caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
<folding />
</state>
</provider>
@ -86,48 +85,8 @@
<file leaf-file-name="TableTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1728">
<caret line="96" column="22" selection-start-line="96" selection-start-column="22" selection-end-line="96" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Table.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="316">
<caret line="111" column="33" selection-start-line="111" selection-start-column="33" selection-end-line="111" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Queue.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Coffee/Queue.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="QueueTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/QueueTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Tile.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="38" column="25" selection-start-line="38" selection-start-column="25" selection-end-line="38" selection-end-column="25" />
<state relative-caret-position="254">
<caret line="109" column="54" selection-start-line="109" selection-start-column="54" selection-end-line="109" selection-end-column="54" />
<folding />
</state>
</provider>
@ -186,17 +145,17 @@
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Position.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Spot.php" />
<option value="$PROJECT_DIR$/index.php" />
<option value="$PROJECT_DIR$/src/Coffee/Map.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/src/Coffee/Stack.php" />
<option value="$PROJECT_DIR$/tests/Coffee/StackTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Spot.php" />
<option value="$PROJECT_DIR$/tests/Coffee/QueueTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Queue.php" />
<option value="$PROJECT_DIR$/tests/Coffee/StackTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Stack.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/index.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" />
</list>
</option>
</component>
@ -424,6 +383,9 @@
<property name="full.screen.before.presentation.mode" value="false" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/tests/Coffee" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/tests/Coffee" />
<recent name="$PROJECT_DIR$/Tests" />
@ -471,8 +433,8 @@
<method />
</configuration>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="PHPUnit.Tests" />
<item index="1" class="java.lang.String" itemvalue="PHP Script.index.php" />
<item index="0" class="java.lang.String" itemvalue="PHP Script.index.php" />
<item index="1" class="java.lang.String" itemvalue="PHPUnit.Tests" />
</list>
<recent_temporary>
<list size="1">
@ -500,21 +462,7 @@
<workItem from="1458671080272" duration="2309000" />
<workItem from="1458673405558" duration="654000" />
<workItem from="1458674128734" duration="1662000" />
<workItem from="1458713666152" duration="1694000" />
</task>
<task id="LOCAL-00003" summary="Refactor Table.isValidFortile to couldContainTile">
<created>1458141252466</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1458141252466</updated>
</task>
<task id="LOCAL-00004" summary="Split Table and Map to the separate classes for decoupling">
<created>1458150107686</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1458150107686</updated>
<workItem from="1458713666152" duration="17050000" />
</task>
<task id="LOCAL-00005" summary="Split Table and Map to the separate classes for decoupling">
<created>1458150506101</created>
@ -845,43 +793,57 @@
<option name="project" value="LOCAL" />
<updated>1458675641510</updated>
</task>
<option name="localTasksCounter" value="52" />
<task id="LOCAL-00052" summary="Introduce Queue">
<created>1458740079474</created>
<option name="number" value="00052" />
<option name="presentableId" value="LOCAL-00052" />
<option name="project" value="LOCAL" />
<updated>1458740079474</updated>
</task>
<task id="LOCAL-00053" summary="Present final version functionality">
<created>1458825316172</created>
<option name="number" value="00053" />
<option name="presentableId" value="LOCAL-00053" />
<option name="project" value="LOCAL" />
<updated>1458825316172</updated>
</task>
<option name="localTasksCounter" value="54" />
<servers />
</component>
<component name="TestHistory">
<history-entry file="Tests - 2016.03.22 at 20h 00m 33s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 19m 22s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 02m 18s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 20m 13s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 07m 23s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 22m 51s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 21m 09s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 24m 34s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 36m 19s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 24m 35s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 39m 39s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 24m 36s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 40m 01s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 25m 02s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 40m 10s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 27m 37s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.23 at 07h 17m 40s.xml">
<history-entry file="Tests - 2016.03.24 at 13h 46m 09s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.23 at 14h 31m 26s.xml">
<history-entry file="Tests - 2016.03.24 at 14h 13m 20s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="10861000" />
<option name="totallyTimeSpent" value="26217000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -898,7 +860,8 @@
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17083333" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
@ -906,9 +869,8 @@
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32294264" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4413965" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@ -917,28 +879,6 @@
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3990025" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Command Line Tools Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3316583" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26558605" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.17222223" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3241895" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="UpdateCopyrightCheckinHandler">
<option name="UPDATE_COPYRIGHT" value="true" />
@ -957,8 +897,6 @@
<component name="VcsManagerConfiguration">
<option name="CHECK_NEW_TODO" value="false" />
<option name="USE_COMMIT_MESSAGE_MARGIN" value="true" />
<MESSAGE value="Implement Tile.representsVoid" />
<MESSAGE value="Implement Tile.isVisited" />
<MESSAGE value="Refactor Map.getTiles and Map.getUnvisitedTiles" />
<MESSAGE value="Implement Map.getNeighboursOfTile" />
<MESSAGE value="Rework Tile constructor" />
@ -982,7 +920,9 @@
<MESSAGE value="Implement Spot.getNumber" />
<MESSAGE value="Present third presentable version" />
<MESSAGE value="Rework Spot number" />
<option name="LAST_COMMIT_MESSAGE" value="Rework Spot number" />
<MESSAGE value="Introduce Queue" />
<MESSAGE value="Present final version functionality" />
<option name="LAST_COMMIT_MESSAGE" value="Present final version functionality" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
@ -991,48 +931,38 @@
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/index.php</url>
<line>53</line>
<option name="timeStamp" value="67" />
<url>file://$PROJECT_DIR$/tests/Coffee/TableTest.php</url>
<line>102</line>
<option name="timeStamp" value="73" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/src/Coffee/Table.php</url>
<line>139</line>
<option name="timeStamp" value="74" />
</line-breakpoint>
</breakpoints>
<breakpoints-dialog>
<breakpoints-dialog />
</breakpoints-dialog>
<option name="time" value="68" />
<option name="time" value="75" />
</breakpoint-manager>
<watches-manager />
<watches-manager>
<configuration name="PhpLocalRunConfigurationType">
<watch expression="$this-&gt;getNeighboursOfTile($tile)" language="PHP" />
<watch expression="$tile" language="PHP" />
<watch expression="$neighbourTile" language="PHP" />
</configuration>
</watches-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="55" column="42" selection-start-line="55" selection-start-column="42" selection-end-line="55" selection-end-column="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../coffeetable_/src/CoffeeTable/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="55" column="42" selection-start-line="55" selection-start-column="42" selection-end-line="55" selection-end-column="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -1045,6 +975,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="113" column="62" selection-start-line="113" selection-start-column="62" selection-end-line="113" selection-end-column="62" />
<folding />
</state>
</provider>
</entry>
@ -1181,13 +1112,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/composer/ClassLoader.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="302" column="0" selection-start-line="302" selection-start-column="0" selection-end-line="302" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -1223,20 +1147,6 @@
</state>
</provider>
</entry>
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Util/TestSuiteIterator.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="50" column="0" selection-start-line="50" selection-start-column="0" selection-end-line="50" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestResult.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="171">
<caret line="685" column="0" selection-start-line="685" selection-start-column="0" selection-end-line="685" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestSuite.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="162">
@ -1258,13 +1168,6 @@
</state>
</provider>
</entry>
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestCase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="191">
<caret line="990" column="0" selection-start-line="990" selection-start-column="0" selection-end-line="990" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
@ -1276,6 +1179,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2988">
<caret line="166" column="38" selection-start-line="166" selection-start-column="38" selection-end-line="166" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
@ -1294,81 +1198,137 @@
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="3" selection-start-line="8" selection-start-column="3" selection-end-line="8" selection-end-column="3" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="38" column="25" selection-start-line="38" selection-start-column="25" selection-end-line="38" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<state relative-caret-position="468">
<caret line="31" column="0" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/index.php">
<entry file="file:///usr/share/nginx/html/coffeetable/tests/Coffee/QueueTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state relative-caret-position="408">
<caret line="23" column="0" selection-start-line="23" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.php">
<entry file="file://$PROJECT_DIR$/tests/Coffee/QueueTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1224">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<state relative-caret-position="180">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Queue.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="3" selection-start-line="8" selection-start-column="3" selection-end-line="8" selection-end-column="3" />
<state relative-caret-position="306">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="27" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestResult.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="38" column="25" selection-start-line="38" selection-start-column="25" selection-end-line="38" selection-end-column="25" />
<state relative-caret-position="181">
<caret line="847" column="0" selection-start-line="847" selection-start-column="0" selection-end-line="847" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Util/TestSuiteIterator.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="316">
<caret line="111" column="33" selection-start-line="111" selection-start-column="33" selection-end-line="111" selection-end-column="33" />
<state relative-caret-position="163">
<caret line="70" column="0" selection-start-line="70" selection-start-column="0" selection-end-line="70" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestCase.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<state relative-caret-position="271">
<caret line="808" column="0" selection-start-line="808" selection-start-column="0" selection-end-line="808" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/QueueTest.php">
<entry file="file://$PROJECT_DIR$/vendor/composer/ClassLoader.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="226">
<caret line="302" column="0" selection-start-line="302" selection-start-column="0" selection-end-line="302" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/StackTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
<state relative-caret-position="324">
<caret line="18" column="40" selection-start-line="18" selection-start-column="40" selection-end-line="18" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1728">
<caret line="96" column="22" selection-start-line="96" selection-start-column="22" selection-end-line="96" selection-end-column="22" />
<state relative-caret-position="254">
<caret line="109" column="54" selection-start-line="109" selection-start-column="54" selection-end-line="109" selection-end-column="54" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Queue.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Stack.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
<caret line="25" column="32" selection-start-line="25" selection-start-column="32" selection-end-line="25" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="433">
<caret line="85" column="1" selection-start-line="85" selection-start-column="1" selection-end-line="85" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
<state relative-caret-position="54">
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding />
</state>
</provider>

@ -71,11 +71,17 @@ try {
echo '</tr>' . "\n";
}
echo '</table>' . "\n";
echo '</br>' . "\n";
echo 'Najväčšia kávová kaluž je s číslom ' . $table->getLargestSpot()->getNumber() . '<br>' . "\n";
echo 'Kaluž je veľká ' . $table->getLargestSpot()->getSize() . ' políčok.</br>' . "\n";
echo 'Najväčšia kávová kaluž je s číslom ';
$numbers = '';
$delimiter = ', ';
foreach ($table->getLargestSpots() as $spot) {
$numbers .= $spot->getNumber() . $delimiter;
}
echo rtrim($numbers, $delimiter) . '<br>' . "\n";
echo 'Kaluž je veľká ' . $table->getFirstLargestSpot()->getSize() . ' políčok.</br>' . "\n";
echo 'Počet kaluží je: ' . $table->getSpotsCount() . '<br>' . "\n";
}
catch (\Exception $e) {

@ -1,30 +0,0 @@
<?php
namespace Coffee;
/**
* Class Queue
*
* @package Coffee
*/
class Queue {
/**
* @var array
*/
private $queue = [];
/**
* @param $element
*/
public function push($element) {
$this->queue[] = $element;
}
/**
* @return mixed
*/
public function pop() {
return array_shift($this->queue);
}
}

@ -0,0 +1,43 @@
<?php
/**
* Created by PhpStorm.
* User: delmadord
* Date: 3/24/16
* Time: 11:33 AM
*/
namespace Coffee;
/**
* Class Stack
*
* @package Coffee
*/
class Stack {
/**
* @var array
*/
private $stack = [];
/**
* @param $var
*/
public function push($var) {
if (is_array($var)) {
foreach ($var as $item) {
$this->stack[] = $item;
}
}
else {
$this->stack[] = $var;
}
}
/**
* @return mixed
*/
public function pop() {
return array_pop($this->stack);
}
}

@ -2,11 +2,6 @@
namespace Coffee;
/**
* Class Table
*
* @package Coffee
*/
/**
* Class Table
*
@ -25,9 +20,14 @@ class Table extends Map {
private $currentSpot = null;
/**
* @var Spot
* @var Spot[]
*/
private $largestSpots = [];
/**
* @var Stack|null
*/
private $largestSpot = null;
private $tileStack = null;
/**
* Table constructor.
@ -38,72 +38,70 @@ class Table extends Map {
parent::__construct($description);
$this->expandSpotsRecursively();
$this->tileStack = new Stack();
$this->tileStack->push(array_reverse($this->getTiles()));
/** @var Tile $tile */
while (($tile = $this->tileStack->pop()) !== null) {
// We have finished the spot
if ($tile->isRepresentingVoid()) {
$tile->visit();
$this->finishCurrentSpot();
continue;
}
// We have a Spot representing Tile
if (!$tile->isVisited()) {
$tile->visit();
$this->updateCurrentSpot($tile);
// Add all the neighbouring, unvisited, Spot representing Tiles
// of the current one to the Stack, so it is picked in next iteration
foreach ($this->getNeighboursOfTile($tile) as $neighbourTile) {
if (!$neighbourTile->isVisited() && $neighbourTile->isRepresentingSpot()) {
$this->tileStack->push($neighbourTile);
}
}
}
}
}
/**
* @return Spot[]
*/
public function getSpots() {
public
function getSpots() {
return $this->spots;
}
/**
* @return int
*/
public function getSpotsCount() {
public
function getSpotsCount() {
return count($this->spots);
}
/**
* @return Spot
* @return Spot[]
*/
public function getLargestSpot() {
return $this->largestSpot;
public
function getLargestSpots() {
return $this->largestSpots;
}
/**
* @param Tile|null $tile
* @return Spot
*/
protected function expandSpotsRecursively($tile = null) {
// Either get Tiles from Map if root or from neighbours if called recursively with argument
foreach ($this->getTilePool($tile) as $currentTile) {
/** @var Tile $currentTile */
if (!$currentTile->isVisited()) {
$currentTile->visit();
if ($currentTile->isRepresentingSpot()) {
// Either form a new Spot or add current Tile to the existing one
$this->updateCurrentSpot($currentTile);
// TODO: Replace recursion by iteration
$this->expandSpotsRecursively($currentTile);
// No other neighbouring tiles were found
$this->finishCurrentSpot();
}
}
public function getFirstLargestSpot() {
if (empty($this->largestSpots)) {
return null;
}
}
/**
* @param $tile
* @return Tile[]
*/
protected function getTilePool($tile = null) {
if (is_null($tile)) {
$tiles = $this->getTiles();
return $tiles;
}
else {
$tiles = $this->getNeighboursOfTile($tile);
return $tiles;
}
return $this->largestSpots[0];
}
/**
@ -118,13 +116,16 @@ class Table extends Map {
}
}
/**
*
*/
private function finishCurrentSpot() {
// Do the finishing process only on the started Spots
if (is_null($this->currentSpot)) {
return;
}
$this->updateLargestSpot();
$this->updateLargestSpots();
// The Spots are numbered from 1
$this->currentSpot->setNumber($this->getSpotsCount() + 1);
@ -132,15 +133,26 @@ class Table extends Map {
$this->currentSpot = null;
}
private function updateLargestSpot() {
if (is_null($this->largestSpot)) {
$this->largestSpot = $this->currentSpot;
/**
*
*/
private function updateLargestSpots() {
if (empty($this->largestSpots)) {
$this->largestSpots[0] = $this->currentSpot;
}
$currentSize = is_null($this->largestSpot) ? 0 : $this->currentSpot->getSize();
$largestSize = is_null($this->largestSpot) ? 0 : $this->largestSpot->getSize();
// Maximum size
$this->largestSpot = $currentSize > $largestSize ? $this->currentSpot : $this->largestSpot;
$currentSize = is_null($this->getFirstLargestSpot()) ? 0 : $this->currentSpot->getSize();
$largestSize = is_null($this->getFirstLargestSpot()) ? 0 : $this->getFirstLargestSpot()->getSize();
if ($largestSize < $currentSize) {
// Replace
$this->largestSpots = [];
$this->largestSpots[] = $this->currentSpot;
}
else if ($largestSize == $currentSize && !in_array($this->currentSpot, $this->largestSpots)) {
// Append only if not present
$this->largestSpots[] = $this->currentSpot;
}
}
}

@ -1,18 +0,0 @@
<?php
namespace Coffee;
// This is not necessary, since it is bootstrapped but serves for debugging purposes
require __DIR__ . '/../../vendor/autoload.php';
class QueueTest extends \PHPUnit_Framework_TestCase {
public function testPushPop() {
$queue = new Queue();
$queue->push('1');
$queue->push('2');
$queue->push('3');
$this->assertEquals('1', $queue->pop());
}
}

@ -0,0 +1,27 @@
<?php
namespace Coffee;
// This is not necessary, since it is bootstrapped but serves for debugging purposes
require __DIR__ . '/../../vendor/autoload.php';
class StackTest extends \PHPUnit_Framework_TestCase {
public function testSinglePushPop() {
$stack = new Stack();
$stack->push('1');
$stack->push('2');
$stack->push('3');
$this->assertEquals('3', $stack->pop());
}
public function testArrayPushPop() {
$stack = new Stack();
$stack->push(['1', '2']);
$stack->push('3');
$stack->push(['4', '5', '6']);
$this->assertEquals('6', $stack->pop());
}
}

@ -56,25 +56,25 @@ class TableTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals([$spot], $table->getSpots());
}
// public function testOneLargeSpot() {
// $table = new Table([
// [0, 0, 1, 0],
// [0, 0, 1, 0],
// [0, 0, 1, 0],
// [0, 1, 0, 1],
// [1, 0, 0, 0],
// ]);
//
// $spot = new Spot($this->newVisitedTile(1, 3));
// $spot->addTile($this->newVisitedTile(2, 3));
// $spot->addTile($this->newVisitedTile(3, 3));
// $spot->addTile($this->newVisitedTile(4, 2));
// $spot->addTile($this->newVisitedTile(4, 4));
// $spot->addTile($this->newVisitedTile(5, 1));
// $spot->setNumber(1);
//
// $this->assertEquals([$spot], $table->getSpots());
// }
public function testOneLargeSpot() {
$table = new Table([
[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 0, 1, 0],
[0, 1, 0, 1],
[1, 0, 0, 0],
]);
$spot = new Spot($this->newVisitedTile(1, 3));
$spot->addTile($this->newVisitedTile(2, 3));
$spot->addTile($this->newVisitedTile(3, 3));
$spot->addTile($this->newVisitedTile(4, 2));
$spot->addTile($this->newVisitedTile(5, 1));
$spot->addTile($this->newVisitedTile(4, 4));
$spot->setNumber(1);
$this->assertEquals([$spot], $table->getSpots());
}
public function testMultipleLargeSpots() {
$table = new Table([
@ -85,8 +85,8 @@ class TableTest extends \PHPUnit_Framework_TestCase {
]);
$spotA = new Spot($this->newVisitedTile(1, 2));
$spotA->addTile($this->newVisitedTile(1, 3));
$spotA->addTile($this->newVisitedTile(2, 3));
$spotA->addTile($this->newVisitedTile(1, 3));
$spotA->addTile($this->newVisitedTile(3, 2));
$spotA->addTile($this->newVisitedTile(4, 1));
$spotA->setNumber(1);
@ -99,20 +99,23 @@ class TableTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals([$spotA, $spotB], $table->getSpots());
}
// public function testLargestSpotSize() {
// $table = new Table([
// [0, 1, 1, 0, 0],
// [1, 1, 1, 0, 1],
// [0, 0, 1, 0, 1],
// [1, 0, 0, 0, 0],
// [0, 0, 1, 1, 1],
// [0, 0, 1, 0, 0],
// [0, 1, 0, 1, 0],
// [1, 0, 0, 0, 0],
// ]);
//
// $this->assertEquals(7, $table->getLargestSpot()->getSize());
// }
public function testLargestSpot() {
$table = new Table([
[0, 1, 1, 0, 0],
[0, 0, 1, 0, 1],
[0, 1, 0, 0, 1],
[1, 0, 0, 1, 0],
]);
$spot = new Spot($this->newVisitedTile(1, 2));
$spot->addTile($this->newVisitedTile(2, 3));
$spot->addTile($this->newVisitedTile(1, 3));
$spot->addTile($this->newVisitedTile(3, 2));
$spot->addTile($this->newVisitedTile(4, 1));
$spot->setNumber(1);
$this->assertEquals([$spot], $table->getLargestSpots());
}
/**
* Wrapper for a visited tile to reduce repetition. This logic does not fit into the Spot class.

Loading…
Cancel
Save