Dodanie listy krokow
This commit is contained in:
parent
030c96221d
commit
e3a9f52e6e
@ -2,11 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<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 afterPath="$PROJECT_DIR$/pool.py" 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$/orderTable.py" beforeDir="false" afterPath="$PROJECT_DIR$/orderTable.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" />
|
<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" />
|
||||||
@ -26,20 +21,15 @@
|
|||||||
</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="294">
|
<state relative-caret-position="266">
|
||||||
<caret line="82" column="21" selection-start-line="82" selection-start-column="21" selection-end-line="82" selection-end-column="21" />
|
<caret line="59" column="33" selection-start-line="59" selection-start-column="33" selection-end-line="59" selection-end-column="33" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/Images/tlo.jpg">
|
|
||||||
<provider selected="true" editor-type-id="images" />
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
<file pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/Images/plytka.png">
|
<entry file="file://$PROJECT_DIR$/Images/plytka.png">
|
||||||
<provider selected="true" editor-type-id="images" />
|
<provider selected="true" editor-type-id="images" />
|
||||||
@ -93,11 +83,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$/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="357">
|
<state relative-caret-position="1281">
|
||||||
<caret line="17" column="32" lean-forward="true" selection-start-line="17" selection-start-column="32" selection-end-line="17" selection-end-column="32" />
|
<caret line="97" lean-forward="true" selection-start-line="97" selection-end-line="97" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#0#13#0" expanded="true" />
|
<element signature="e#0#13#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
@ -131,9 +121,9 @@
|
|||||||
<option value="$PROJECT_DIR$/run.py" />
|
<option value="$PROJECT_DIR$/run.py" />
|
||||||
<option value="$PROJECT_DIR$/order.py" />
|
<option value="$PROJECT_DIR$/order.py" />
|
||||||
<option value="$PROJECT_DIR$/table.py" />
|
<option value="$PROJECT_DIR$/table.py" />
|
||||||
<option value="$PROJECT_DIR$/waiter.py" />
|
|
||||||
<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$/game.py" />
|
<option value="$PROJECT_DIR$/game.py" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
@ -393,9 +383,6 @@
|
|||||||
<entry file="file://$PROJECT_DIR$/Images/plytka.png">
|
<entry file="file://$PROJECT_DIR$/Images/plytka.png">
|
||||||
<provider selected="true" editor-type-id="images" />
|
<provider selected="true" editor-type-id="images" />
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/Images/tlo.jpg">
|
|
||||||
<provider selected="true" editor-type-id="images" />
|
|
||||||
</entry>
|
|
||||||
<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="420">
|
<state relative-caret-position="420">
|
||||||
@ -441,22 +428,25 @@
|
|||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/game.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="294">
|
|
||||||
<caret line="82" column="21" selection-start-line="82" selection-start-column="21" selection-end-line="82" selection-end-column="21" />
|
|
||||||
</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="357">
|
<state relative-caret-position="1281">
|
||||||
<caret line="17" column="32" lean-forward="true" selection-start-line="17" selection-start-column="32" selection-end-line="17" selection-end-column="32" />
|
<caret line="97" lean-forward="true" selection-start-line="97" selection-end-line="97" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#0#13#0" expanded="true" />
|
<element signature="e#0#13#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/Images/tlo.jpg">
|
||||||
|
<provider selected="true" editor-type-id="images" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/game.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="266">
|
||||||
|
<caret line="59" column="33" selection-start-line="59" selection-start-column="33" selection-end-line="59" selection-end-column="33" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
Binary file not shown.
@ -12,6 +12,7 @@ class Waiter(object):
|
|||||||
self.image = pygame.image.load("./Images/waiter.png").convert()
|
self.image = pygame.image.load("./Images/waiter.png").convert()
|
||||||
self.image.set_colorkey((255, 255, 255))
|
self.image.set_colorkey((255, 255, 255))
|
||||||
self.type = "waiter"
|
self.type = "waiter"
|
||||||
|
self.lastStep = []
|
||||||
|
|
||||||
|
|
||||||
def moveLeft(self, game):
|
def moveLeft(self, game):
|
||||||
@ -25,6 +26,7 @@ class Waiter(object):
|
|||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x-1)]
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x-1)]
|
||||||
game.waiterNumberInGrid.x -= 1
|
game.waiterNumberInGrid.x -= 1
|
||||||
|
self.lastStep.append("Left")
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
def moveRight(self, game):
|
def moveRight(self, game):
|
||||||
@ -38,6 +40,7 @@ class Waiter(object):
|
|||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x + 1)]
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x + 1)]
|
||||||
game.waiterNumberInGrid.x += 1
|
game.waiterNumberInGrid.x += 1
|
||||||
|
self.lastStep.append("Right")
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -52,6 +55,7 @@ class Waiter(object):
|
|||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
||||||
game.grid[int(game.waiterNumberInGrid.y-1)][int(game.waiterNumberInGrid.x)]
|
game.grid[int(game.waiterNumberInGrid.y-1)][int(game.waiterNumberInGrid.x)]
|
||||||
game.waiterNumberInGrid.y -= 1
|
game.waiterNumberInGrid.y -= 1
|
||||||
|
self.lastStep.append("Up")
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -66,6 +70,7 @@ class Waiter(object):
|
|||||||
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
game.grid[int(game.waiterNumberInGrid.y)][int(game.waiterNumberInGrid.x)], \
|
||||||
game.grid[int(game.waiterNumberInGrid.y + 1)][int(game.waiterNumberInGrid.x)]
|
game.grid[int(game.waiterNumberInGrid.y + 1)][int(game.waiterNumberInGrid.x)]
|
||||||
game.waiterNumberInGrid.y += 1
|
game.waiterNumberInGrid.y += 1
|
||||||
|
self.lastStep.append("Down")
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -88,4 +93,5 @@ class Waiter(object):
|
|||||||
def draw(self):
|
def draw(self):
|
||||||
self.rect1 = pygame.Rect(self.x, self.y, 50, 50)
|
self.rect1 = pygame.Rect(self.x, self.y, 50, 50)
|
||||||
pygame.draw.rect(self.game.screen, (0, 150, 255), self.rect1)
|
pygame.draw.rect(self.game.screen, (0, 150, 255), self.rect1)
|
||||||
|
print(self.lastStep)
|
||||||
self.game.screen.blit(self.image, (self.x, self.y))
|
self.game.screen.blit(self.image, (self.x, self.y))
|
||||||
|
Loading…
Reference in New Issue
Block a user