Rework Spot number

master
Peter Babič 8 years ago
parent 0a440e0843
commit 5d7c8c4ce7
Signed by: peter.babic
GPG Key ID: 4BB075BC1884BA40
  1. 338
      .idea/workspace.xml
  2. 10
      index.php
  3. 1
      src/Coffee/Map.php
  4. 7
      src/Coffee/Spot.php
  5. 35
      src/Coffee/Tile.php
  6. 5
      tests/Coffee/TileTest.php

@ -4,14 +4,13 @@
<option name="ANALYZE_TEST_SOURCES" value="false" />
</component>
<component name="ChangeListManager">
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Present third presentable version">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/blade.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Rework Spot number">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/composer.lock" afterPath="$PROJECT_DIR$/composer.lock" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.php" afterPath="$PROJECT_DIR$/index.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Map.php" afterPath="$PROJECT_DIR$/src/Coffee/Map.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Spot.php" afterPath="$PROJECT_DIR$/src/Coffee/Spot.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Tile.php" afterPath="$PROJECT_DIR$/src/Coffee/Tile.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/TableTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/TileTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
</list>
<ignored path="coffeetable.iws" />
<ignored path=".idea/workspace.xml" />
@ -37,81 +36,81 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="TableTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<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="81">
<caret line="58" column="0" selection-start-line="58" selection-start-column="2" selection-end-line="76" selection-end-column="7" />
<state relative-caret-position="334">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Spot.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<file leaf-file-name="Map.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1386">
<caret line="82" column="26" selection-start-line="82" selection-start-column="26" selection-end-line="82" selection-end-column="26" />
<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>
</file>
<file leaf-file-name="Table.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<file leaf-file-name="TileTest.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="155">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<state relative-caret-position="370">
<caret line="26" column="5" selection-start-line="26" selection-start-column="5" selection-end-line="26" selection-end-column="5" />
<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="SpotTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="522">
<caret line="29" column="0" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
<state relative-caret-position="295">
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
<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">
<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="272">
<caret line="37" column="28" selection-start-line="37" selection-start-column="28" selection-end-line="37" selection-end-column="28" />
<state relative-caret-position="181">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/index.php">
<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="281">
<caret line="26" column="9" selection-start-line="26" selection-start-column="9" selection-end-line="26" selection-end-column="9" />
<state relative-caret-position="161">
<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="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="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="155">
<caret line="70" column="7" selection-start-line="70" selection-start-column="7" selection-end-line="70" selection-end-column="7" />
<state relative-caret-position="323">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Position.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<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="2988">
<caret line="166" column="38" selection-start-line="166" selection-start-column="38" selection-end-line="166" selection-end-column="38" />
<state relative-caret-position="666">
<caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" />
<folding />
</state>
</provider>
@ -165,18 +164,18 @@
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Map.php" />
<option value="/usr/share/nginx/html/coffeetable/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/MapTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Map.php" />
<option value="$PROJECT_DIR$/tests/Coffee/PositionTest.php" />
<option value="/usr/share/nginx/html/coffeetable/tests/Coffee/TileTest.php" />
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/src/Coffee/Spot.php" />
<option value="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/src/Coffee/Position.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.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" />
</list>
</option>
</component>
@ -220,8 +219,10 @@
</include_path>
</component>
<component name="ProjectFrameBounds">
<option name="width" value="1440" />
<option name="height" value="871" />
<option name="x" value="-2" />
<option name="y" value="-26" />
<option name="width" value="1444" />
<option name="height" value="899" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
@ -302,62 +303,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="tests" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Coffee" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Coffee" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
@ -372,7 +318,16 @@
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
@ -381,7 +336,7 @@
<property name="options.splitter.details.proportions" value="0.2" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="SearchEverywhereHistoryKey" value="todo&#9;ACTION&#9;ActivateTODOToolWindow&#10;debug&#9;null&#9;null&#10;history&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;colum&#9;ACTION&#9;EditorToggleColumnMode&#10;reform&#9;ACTION&#9;ReformatCode&#10;replace in pa&#9;ACTION&#9;ReplaceInPath&#10;hist&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;paste&#9;ACTION&#9;EditorPasteSimple&#10;rear &#9;ACTION&#9;RearrangeCode&#10;histor&#9;ACTION&#9;Vcs.ShowTabbedFileHistory&#10;rep in pa&#9;ACTION&#9;ReplaceInPath&#10;replace in&#9;ACTION&#9;ReplaceInPath&#10;rearr&#9;ACTION&#9;RearrangeCode&#10;rea&#9;ACTION&#9;RearrangeCode&#10;orde&#9;null&#9;null&#10;next hi&#9;ACTION&#9;GotoNextError&#10;next&#9;ACTION&#9;GotoNextError&#10;comm cha&#9;ACTION&#9;ChangesView.Commit&#10;comple&#9;ACTION&#9;CodeCompletionGroup&#10;complet&#9;ACTION&#9;CodeCompletionGroup&#10;sear&#9;ACTION&#9;SearchEverywhere&#10;breakpoint&#9;ACTION&#9;ToggleLineBreakpoint&#10;comm ch&#9;ACTION&#9;ChangesView.Commit&#10;smart&#9;ACTION&#9;SmartTypeCompletion&#10;para&#9;ACTION&#9;IntroduceParameter&#10;keyma&#9;ACTION&#9;ChangeKeymap&#10;commit&#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;commit &#9;ACTION&#9;Vcs.CheckCommitMessageSpelling&#10;phpunit&#9;null&#9;null&#10;exte&#9;ACTION&#9;EditorSelectWord&#10;composer&#9;ACTION&#9;ComposerGroup&#10;test&#9;ACTION&#9;RerunTests&#10;rer&#9;ACTION&#9;RerunTests&#10;tests&#9;ACTION&#9;RerunTests&#10;hpunit&#9;ACTION&#9;PhpUnitGenerateTestMethod&#10;phpuni&#9;ACTION&#9;PhpUnitNewTest&#10;rear&#9;ACTION&#9;RearrangeCode" />
<property name="settings.editor.selected.configurable" value="Errors" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<property name="last_directory_selection" value="$PROJECT_DIR$" />
@ -476,14 +431,10 @@
<workItem from="1458579942818" duration="1062000" />
<workItem from="1458581790839" duration="767000" />
<workItem from="1458582563771" duration="164000" />
<workItem from="1458583053423" duration="1937000" />
</task>
<task id="LOCAL-00001" summary="Create Spot and SpotTest">
<created>1458136416618</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1458136416618</updated>
<workItem from="1458583053423" duration="2549000" />
<workItem from="1458671080272" duration="2309000" />
<workItem from="1458673405558" duration="654000" />
<workItem from="1458674128734" duration="1508000" />
</task>
<task id="LOCAL-00002" summary="Refactor coordinates in Tile from X,Y to col,row">
<created>1458140295782</created>
@ -821,43 +772,50 @@
<option name="project" value="LOCAL" />
<updated>1458520456074</updated>
</task>
<option name="localTasksCounter" value="50" />
<task id="LOCAL-00050" summary="Present third presentable version">
<created>1458586130406</created>
<option name="number" value="00050" />
<option name="presentableId" value="LOCAL-00050" />
<option name="project" value="LOCAL" />
<updated>1458586130407</updated>
</task>
<option name="localTasksCounter" value="51" />
<servers />
</component>
<component name="TestHistory">
<history-entry file="Tests - 2016.03.21 at 18h 11m 08s.xml">
<history-entry file="Tests - 2016.03.22 at 19h 57m 49s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 37m 40s.xml">
<history-entry file="Tests - 2016.03.22 at 19h 59m 01s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 37m 43s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 00m 33s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 41m 36s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 02m 18s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 43m 02s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 07m 23s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 43m 22s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 21m 09s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 18h 58m 10s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 36m 19s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 19h 38m 11s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 39m 39s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 19h 41m 43s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 40m 01s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.21 at 19h 43m 05s.xml">
<history-entry file="Tests - 2016.03.22 at 20h 40m 10s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3930000" />
<option name="totallyTimeSpent" value="9013000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -869,21 +827,21 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="871" extended-state="0" />
<editor active="true" />
<frame x="-2" y="-26" width="1444" height="899" extended-state="6" />
<editor active="false" />
<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.17130919" 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.32816538" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32816538" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<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="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.33" 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" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2648579" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25561097" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<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.32299742" 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.32294264" 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="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" />
@ -933,7 +891,6 @@
<component name="VcsManagerConfiguration">
<option name="CHECK_NEW_TODO" value="false" />
<option name="USE_COMMIT_MESSAGE_MARGIN" value="true" />
<MESSAGE value="Implement Map.getTileByPosition and do some refactoring" />
<MESSAGE value="Implement Tile.representsVoid" />
<MESSAGE value="Implement Tile.isVisited" />
<MESSAGE value="Refactor Map.getTiles and Map.getUnvisitedTiles" />
@ -958,7 +915,8 @@
<MESSAGE value="Present second version with valid Spots output" />
<MESSAGE value="Implement Spot.getNumber" />
<MESSAGE value="Present third presentable version" />
<option name="LAST_COMMIT_MESSAGE" value="Present third presentable version" />
<MESSAGE value="Rework Spot number" />
<option name="LAST_COMMIT_MESSAGE" value="Rework Spot number" />
<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" />
@ -966,33 +924,18 @@
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/tests/Coffee/TileTest.php</url>
<line>29</line>
<option name="timeStamp" value="57" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/index.php</url>
<line>53</line>
<option name="timeStamp" value="58" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/tests/Coffee/TableTest.php</url>
<line>59</line>
<option name="timeStamp" value="64" />
<option name="timeStamp" value="67" />
</line-breakpoint>
</breakpoints>
<breakpoints-dialog>
<breakpoints-dialog />
</breakpoints-dialog>
<option name="time" value="65" />
<option name="time" value="68" />
</breakpoint-manager>
<watches-manager>
<configuration name="PhpLocalRunConfigurationType">
<watch expression="$currentTile-&gt;*Coffee\Position*column" />
<watch expression="$currentTile-&gt;*Coffee\Position*row" />
</configuration>
</watches-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
@ -1124,7 +1067,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="15" column="35" selection-start-line="15" selection-start-column="35" selection-end-line="15" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
@ -1170,13 +1112,6 @@
</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="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/bin/phpunit">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -1205,13 +1140,6 @@
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="23" column="20" selection-start-line="23" selection-start-column="20" selection-end-line="23" selection-end-column="20" />
</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">
@ -1226,13 +1154,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/PositionTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -1289,11 +1210,17 @@
</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="522">
<caret line="29" column="0" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
<folding />
<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">
<caret line="75" column="0" selection-start-line="75" selection-start-column="0" selection-end-line="75" selection-end-column="0" />
</state>
</provider>
</entry>
@ -1305,66 +1232,81 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<entry file="file:///usr/share/nginx/html/coffeetable/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1386">
<caret line="82" column="26" selection-start-line="82" selection-start-column="26" selection-end-line="82" selection-end-column="26" />
<state relative-caret-position="408">
<caret line="29" column="54" selection-start-line="29" selection-start-column="54" selection-end-line="29" selection-end-column="54" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<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>
<entry file="phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestCase.php">
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.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 relative-caret-position="295">
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="155">
<caret line="70" column="7" selection-start-line="70" selection-start-column="7" selection-end-line="70" selection-end-column="7" />
<state relative-caret-position="666">
<caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="155">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<state relative-caret-position="181">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///usr/share/nginx/html/coffeetable/tests/Coffee/TableTest.php">
<entry file="file:///usr/share/nginx/html/coffeetable/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="75" column="0" selection-start-line="75" selection-start-column="0" selection-end-line="75" selection-end-column="0" />
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="81">
<caret line="58" column="0" selection-start-line="58" selection-start-column="2" selection-end-line="76" selection-end-column="7" />
<state relative-caret-position="334">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Map.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
<caret line="37" column="28" selection-start-line="37" selection-start-column="28" selection-end-line="37" selection-end-column="28" />
<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$/index.php">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<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="281">
<caret line="26" column="9" selection-start-line="26" selection-start-column="9" selection-end-line="26" selection-end-column="9" />
<state relative-caret-position="370">
<caret line="26" column="5" selection-start-line="26" selection-start-column="5" selection-end-line="26" selection-end-column="5" />
<folding />
</state>
</provider>

@ -58,8 +58,14 @@ try {
echo '<tr>' . "\n";
/** @var Tile $tile */
foreach ($tileRow as $tile) {
$spotNumber = $tile->getSpotNumber();
$attribute = $spotNumber == 0 ? '' : ' class="coffee"';
$spotNumber = 0;
$attribute = '';
if (!is_null($tile->getSpot())) {
$spotNumber = $tile->getSpot()->getNumber();
$attribute = ' class="coffee"';
}
echo '<td' . $attribute . '>' . $spotNumber . '</td>' . "\n";
}
echo '</tr>' . "\n";

@ -68,7 +68,6 @@ class Map {
/**
* @return array
* TODO: this is probably not used anywhere
*/
public function getDescription() {
return $this->description;

@ -28,7 +28,7 @@ class Spot {
/**
* @var int
*/
private $number = 0;
private $number;
/**
* Spot constructor.
@ -48,6 +48,7 @@ class Spot {
return false;
}
$tile->setSpot($this);
$this->tiles[] = $tile;
return true;
}
@ -78,9 +79,5 @@ class Spot {
*/
public function setNumber($number) {
$this->number = $number;
foreach ($this->getTiles() as $tile) {
$tile->setSpotNumber($number);
}
}
}

@ -32,10 +32,11 @@ class Tile extends Position {
*/
private $visited = self::DEFAULT_VISITED_STATE;
/**
* Zero means that the tile is not in the spot
* @var int
* Spot that this Tile belongs to
*
* @var Spot
*/
private $spotNumber = 0;
private $spot = null;
/**
* Tile constructor.
@ -61,6 +62,20 @@ class Tile extends Position {
$this->visited = $visited;
}
/**
* @return Spot
*/
public function getSpot() {
return $this->spot;
}
/**
* @param Spot $spot
*/
public function setSpot(Spot $spot) {
$this->spot = $spot;
}
/**
* @return boolean
*/
@ -89,19 +104,5 @@ class Tile extends Position {
return $this->representation == self::REPRESENTS_VOID;
}
/**
* @return int
* TODO: rework this to store parent object instead of just number
*/
public function getSpotNumber() {
return $this->spotNumber;
}
/**
* @param int $spotNumber
*/
public function setSpotNumber($spotNumber) {
$this->spotNumber = $spotNumber;
}
}

@ -28,9 +28,10 @@ class TileTest extends \PHPUnit_Framework_TestCase {
public function testSpotNumber() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$tile->setSpotNumber(4);
$tile->setSpot(new Spot($tile));
$tile->getSpot()->setNumber(4);
$this->assertEquals(4, $tile->getSpotNumber());
$this->assertEquals(4, $tile->getSpot()->getNumber());
}
}

Loading…
Cancel
Save