From 8c310185884dc5359bb0d3f65d773cf1f6fefbc3 Mon Sep 17 00:00:00 2001 From: Yaroslav Ivanov Date: Mon, 9 Sep 2024 08:56:39 +0300 Subject: [PATCH] updated --- app/main.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index 60784ed..6009ad6 100644 --- a/app/main.py +++ b/app/main.py @@ -15,15 +15,14 @@ def __init__(self, end: tuple, is_drowned: bool = False) -> None: - self.decks = [] if start == end: - self.decks.append(Deck(*start)) + self.decks = [Deck(*start)] if start[1] < end[1]: - for end_ in range(start[1], end[1] + 1): - self.decks.append(Deck(start[0], end_)) + self.decks = [Deck(start[0], end_) + for end_ in range(start[1], end[1] + 1)] if start[0] < end[0]: - for start_ in range(start[0], end[0] + 1): - self.decks.append(Deck(start_, start[1])) + self.decks = [Deck(start_, start[1]) + for start_ in range(start[0], end[0] + 1)] self.is_drowned = is_drowned def get_deck(self,