From dd539555b9e70a623e72092baa6c5c9240a22620 Mon Sep 17 00:00:00 2001 From: ehermakov Date: Mon, 3 Jun 2024 17:13:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BA=D0=BE=D0=B4=20=D1=81=20=D0=B4=D0=B7=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BF=D0=BE=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D1=80=D0=B0=D0=B1=D0=BB=D0=B5=D0=B9=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShipCraft/Переделка/.idea/workspace.xml | 23 +++++++++--------- .../ShipCraft/Переделка/ShipField.py | 3 +++ .../__pycache__/ShipField.cpython-311.pyc | Bin 14293 -> 14497 bytes 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/HNS/Excercises/ShipCraft/Переделка/.idea/workspace.xml b/HNS/Excercises/ShipCraft/Переделка/.idea/workspace.xml index 4cd2d83..f14cbbc 100644 --- a/HNS/Excercises/ShipCraft/Переделка/.idea/workspace.xml +++ b/HNS/Excercises/ShipCraft/Переделка/.idea/workspace.xml @@ -5,9 +5,8 @@ - - + - { + "keyToString": { + "Python.ShipField.executor": "Run", + "Python.main (1).executor": "Run", + "Python.main.executor": "Debug", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "git-widget-placeholder": "main", + "last_opened_file_path": "Y:/Downloads/временный гит/hnc-eduard/HNS/Excercises/ShipCraft/Переделка" } -}]]> +} diff --git a/HNS/Excercises/ShipCraft/Переделка/ShipField.py b/HNS/Excercises/ShipCraft/Переделка/ShipField.py index d4b0519..467a5b0 100644 --- a/HNS/Excercises/ShipCraft/Переделка/ShipField.py +++ b/HNS/Excercises/ShipCraft/Переделка/ShipField.py @@ -110,6 +110,9 @@ class ShipField: self.ships.remove(self.ship_size) self.print_field() + if self.ship_size not in self.ships and len(self.ships) > 0: + self.ship_size = max(self.ships) + def get_ship(self, row, col): if row < 0 or row > ShipField.field_size: return diff --git a/HNS/Excercises/ShipCraft/Переделка/__pycache__/ShipField.cpython-311.pyc b/HNS/Excercises/ShipCraft/Переделка/__pycache__/ShipField.cpython-311.pyc index 5a945b970f5b1124210c4e85282e712a54f8f8ef..428d4c3ec301d4f86cefb00b7da2c2f41f2f407e 100644 GIT binary patch delta 662 zcmcbbzp#*RIWI340}%M0i%sL!+Q`Qw!lcDK`JP0|<}wjGrkEOrELM;-2mslf5EcVN z8Do)gi6o4NDz}W0fnhZeLqG~+HVcSVBwHd46#`NqvnKy$l~jV8p285!0K=Nhenm_` zRks)oHTfnV6?5k*QUP(9a}z5j^N0s9&1IatQAuPnpPbs}8RE)}P7k>Gd+Zj7ERnjv ztqnw5nK!s>@!H70h5vx!B?IRR2F`b76+qH6KZ3=-;E)9y3IK&0qH6#E delta 407 zcmZ2jcr~AIIWI340}x!@7n?R!b0Z&<2-6a#$*Uw&HkXOmF$tzH1T$zd`xP+(mE2-9 z)a04$E$%*fj(7lL;^w#Fag1yiIHZ7RbFZWkD`Vm219E*VjINXYmDL#+Z!T9ZVPp)L z{6@uqanoj5)kr4B?VHQhCo=)XxV20fLnk|G$uOST9H*tp#OO7-Lq~@3`sSrNN{lid zK+B3mK|~agC5~ExAUFNuu*uC&Da}c>D=L~SU=d{R U$igV~fdM=D5iI@%hb-7o0CtINlmGw#