fix some bugs

This commit is contained in:
eduard ermakov 2024-07-14 22:15:50 +03:00
parent 3289eab1f4
commit 7dc71439d8
4 changed files with 2 additions and 4 deletions

View File

@ -5,11 +5,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="b389cdea-22f5-4ba2-8b46-337091984b3c" name="Changes" comment="код по 22 части урока">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/Переделка.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/Переделка.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ShipField.py" beforeDir="false" afterPath="$PROJECT_DIR$/ShipField.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@ -56,7 +56,7 @@ class ShipField:
elif self.field_mode == ShipMode.SHOOT:
shoot_result = self.shoot(row, col)
return shoot_result == ShootResult.EMPTY
return shoot_result == ShootResult.UNDEFINED
return False

View File

@ -0,0 +1 @@
{"shipField": {"field": [" ", " ", " ", "", " ", "1", " ", " ", " ", " ", "1", "", " ", "1", "", "1", " ", " ", " ", " ", "1", "", " ", "1", "", "1", " ", " ", " ", " ", " ", " ", " ", "", "", " ", " ", " ", " ", " ", " ", " ", "1", "", "", "", "1", " ", " ", " ", "1", " ", "1", "", "", "", "1", " ", " ", " ", "1", " ", "1", "", "", "", "1", " ", " ", " ", " ", " ", "1", "", "", " ", " ", " ", " ", " ", " ", " ", " ", "", " ", " ", " ", " ", " ", "", " ", "1", " ", "1", " ", "", "1", " ", " ", "1"], "ships": [], "field_mode": "PUT", "ship_size": 1, "ship_direction": "VERTICAL"}}