zrzut scieżki do pliku ale bez stanu mapy itp.

This commit is contained in:
Arkadiusz 2019-05-21 11:18:40 +01:00
parent 6b6341d7c3
commit 615cf534af
3 changed files with 46 additions and 51 deletions

View File

@ -4,8 +4,6 @@
<list default="true" id="152ea650-8e02-4ed6-aa8c-04d44b275be4" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/game.py" beforeDir="false" afterPath="$PROJECT_DIR$/game.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/table.py" beforeDir="false" afterPath="$PROJECT_DIR$/table.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/waiter.py" beforeDir="false" afterPath="$PROJECT_DIR$/waiter.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -24,11 +22,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/game.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="413">
<caret line="58" column="32" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
<state relative-caret-position="380">
<caret line="132" column="50" selection-start-line="132" selection-start-column="50" selection-end-line="132" selection-end-column="50" />
</state>
</provider>
</entry>
@ -47,11 +45,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/table.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="506">
<caret line="23" column="8" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
<state relative-caret-position="528">
<caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
</state>
</provider>
</entry>
@ -59,8 +57,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pool.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="65" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
<state relative-caret-position="154">
<caret line="8" column="65" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
@ -80,14 +78,10 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/waiter.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="682">
<caret line="31" column="71" selection-start-line="31" selection-start-column="71" selection-end-line="31" selection-end-column="71" />
<state relative-caret-position="-16">
<caret line="104" column="5" selection-start-line="104" selection-start-column="5" selection-end-line="104" selection-end-column="5" />
<folding>
<element signature="e#0#14#0" expanded="true" />
<element signature="e#5085#9582#0" />
<element signature="e#9661#13495#0" />
<element signature="e#13574#17411#0" />
<element signature="e#17456#17806#0" />
</folding>
</state>
</provider>
@ -131,12 +125,12 @@
<option value="$PROJECT_DIR$/orderTable.py" />
<option value="$PROJECT_DIR$/pool.py" />
<option value="$PROJECT_DIR$/waiter.py" />
<option value="$PROJECT_DIR$/game.py" />
<option value="$PROJECT_DIR$/table.py" />
<option value="$PROJECT_DIR$/game.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="-7" />
<option name="width" value="1660" />
<option name="height" value="1047" />
@ -429,10 +423,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/order.py">
<entry file="file://$PROJECT_DIR$/gridElement.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" selection-start-line="6" selection-end-line="6" />
<state relative-caret-position="154">
<caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pool.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="8" column="65" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -443,51 +447,37 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/game.py">
<entry file="file://$PROJECT_DIR$/table.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="413">
<caret line="58" column="32" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
<state relative-caret-position="528">
<caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Images/tableSmall.png">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/order.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" selection-start-line="6" selection-end-line="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/waiter.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="682">
<caret line="31" column="71" selection-start-line="31" selection-start-column="71" selection-end-line="31" selection-end-column="71" />
<state relative-caret-position="-16">
<caret line="104" column="5" selection-start-line="104" selection-start-column="5" selection-end-line="104" selection-end-column="5" />
<folding>
<element signature="e#0#14#0" expanded="true" />
<element signature="e#5085#9582#0" />
<element signature="e#9661#13495#0" />
<element signature="e#13574#17411#0" />
<element signature="e#17456#17806#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gridElement.py">
<entry file="file://$PROJECT_DIR$/game.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pool.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="65" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/table.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="506">
<caret line="23" column="8" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
<state relative-caret-position="380">
<caret line="132" column="50" selection-start-line="132" selection-start-column="50" selection-end-line="132" selection-end-column="50" />
</state>
</provider>
</entry>

View File

@ -128,9 +128,12 @@ class Game(object):
print("Wszystkie sciezki bfs: ", paths)
if paths:
bestPath = paths[0]
savedPaths = open("savedPaths.txt", "a+")
print(str(bestPath))
savedPaths.write(str(bestPath) + "\n")
waiter.bfsPaths = []
waiter.followThePath(bestPath)
savedPaths.close()
if __name__ == "__main__":
v1 = Game()

2
savedPaths.txt Normal file
View File

@ -0,0 +1,2 @@
['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left']
['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right']