zrzut scieżki do pliku ale bez stanu mapy itp.
This commit is contained in:
parent
6b6341d7c3
commit
615cf534af
@ -4,8 +4,6 @@
|
|||||||
<list default="true" id="152ea650-8e02-4ed6-aa8c-04d44b275be4" name="Default Changelist" comment="">
|
<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$/.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$/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>
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
@ -24,11 +22,11 @@
|
|||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/game.py">
|
<entry file="file://$PROJECT_DIR$/game.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="413">
|
<state relative-caret-position="380">
|
||||||
<caret line="58" column="32" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
|
<caret line="132" column="50" selection-start-line="132" selection-start-column="50" selection-end-line="132" selection-end-column="50" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
@ -47,11 +45,11 @@
|
|||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file pinned="false" current-in-tab="true">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/table.py">
|
<entry file="file://$PROJECT_DIR$/table.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="506">
|
<state relative-caret-position="528">
|
||||||
<caret line="23" column="8" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
|
<caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
@ -59,8 +57,8 @@
|
|||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/pool.py">
|
<entry file="file://$PROJECT_DIR$/pool.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="176">
|
<state relative-caret-position="154">
|
||||||
<caret line="8" column="65" lean-forward="true" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
|
<caret line="8" column="65" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="65" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#0#13#0" expanded="true" />
|
<element signature="e#0#13#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
@ -80,14 +78,10 @@
|
|||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/waiter.py">
|
<entry file="file://$PROJECT_DIR$/waiter.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="682">
|
<state relative-caret-position="-16">
|
||||||
<caret line="31" column="71" selection-start-line="31" selection-start-column="71" selection-end-line="31" selection-end-column="71" />
|
<caret line="104" column="5" selection-start-line="104" selection-start-column="5" selection-end-line="104" selection-end-column="5" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#0#14#0" expanded="true" />
|
<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>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
@ -131,12 +125,12 @@
|
|||||||
<option value="$PROJECT_DIR$/orderTable.py" />
|
<option value="$PROJECT_DIR$/orderTable.py" />
|
||||||
<option value="$PROJECT_DIR$/pool.py" />
|
<option value="$PROJECT_DIR$/pool.py" />
|
||||||
<option value="$PROJECT_DIR$/waiter.py" />
|
<option value="$PROJECT_DIR$/waiter.py" />
|
||||||
<option value="$PROJECT_DIR$/game.py" />
|
|
||||||
<option value="$PROJECT_DIR$/table.py" />
|
<option value="$PROJECT_DIR$/table.py" />
|
||||||
|
<option value="$PROJECT_DIR$/game.py" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectFrameBounds" extendedState="6">
|
<component name="ProjectFrameBounds" extendedState="7">
|
||||||
<option name="x" value="-7" />
|
<option name="x" value="-7" />
|
||||||
<option name="width" value="1660" />
|
<option name="width" value="1660" />
|
||||||
<option name="height" value="1047" />
|
<option name="height" value="1047" />
|
||||||
@ -429,10 +423,20 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/order.py">
|
<entry file="file://$PROJECT_DIR$/gridElement.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="132">
|
<state relative-caret-position="154">
|
||||||
<caret line="6" selection-start-line="6" selection-end-line="6" />
|
<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>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
@ -443,51 +447,37 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/game.py">
|
<entry file="file://$PROJECT_DIR$/table.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="413">
|
<state relative-caret-position="528">
|
||||||
<caret line="58" column="32" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
|
<caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/Images/tableSmall.png">
|
<entry file="file://$PROJECT_DIR$/Images/tableSmall.png">
|
||||||
<provider selected="true" editor-type-id="images" />
|
<provider selected="true" editor-type-id="images" />
|
||||||
</entry>
|
</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">
|
<entry file="file://$PROJECT_DIR$/waiter.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="682">
|
<state relative-caret-position="-16">
|
||||||
<caret line="31" column="71" selection-start-line="31" selection-start-column="71" selection-end-line="31" selection-end-column="71" />
|
<caret line="104" column="5" selection-start-line="104" selection-start-column="5" selection-end-line="104" selection-end-column="5" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#0#14#0" expanded="true" />
|
<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>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/gridElement.py">
|
<entry file="file://$PROJECT_DIR$/game.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="154">
|
<state relative-caret-position="380">
|
||||||
<caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
|
<caret line="132" column="50" selection-start-line="132" selection-start-column="50" selection-end-line="132" selection-end-column="50" />
|
||||||
</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>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
5
game.py
5
game.py
@ -128,9 +128,12 @@ class Game(object):
|
|||||||
print("Wszystkie sciezki bfs: ", paths)
|
print("Wszystkie sciezki bfs: ", paths)
|
||||||
if paths:
|
if paths:
|
||||||
bestPath = paths[0]
|
bestPath = paths[0]
|
||||||
|
savedPaths = open("savedPaths.txt", "a+")
|
||||||
|
print(str(bestPath))
|
||||||
|
savedPaths.write(str(bestPath) + "\n")
|
||||||
waiter.bfsPaths = []
|
waiter.bfsPaths = []
|
||||||
waiter.followThePath(bestPath)
|
waiter.followThePath(bestPath)
|
||||||
|
savedPaths.close()
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
v1 = Game()
|
v1 = Game()
|
||||||
|
|
||||||
|
2
savedPaths.txt
Normal file
2
savedPaths.txt
Normal 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']
|
Loading…
Reference in New Issue
Block a user