Skip to content

Commit d931345

Browse files
author
Hiago Inacio
committed
remove Ship.check_number_of_ships from screen.
1 parent 2e81b2f commit d931345

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

module/spaceScreen.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,12 @@ def click_first(btns_pos, search_img):
293293

294294
if click_first(buttons_position, search_img):
295295
n_ships +=1
296-
start_time = time.time()
297-
while not Ship.check_number_of_ships(Image.screen(), n_ships):
298-
if time.time() - start_time > 15:
299-
if not Ship.check_number_of_ships(Image.screen(), n_ships):
300-
raise Exception(f"Error trying to send {n_ships} ships to fight.")
296+
time.sleep(0.5)
297+
# start_time = time.time()
298+
# while not Ship.check_number_of_ships(Image.screen(), n_ships):
299+
# if time.time() - start_time > 15:
300+
# if not Ship.check_number_of_ships(Image.screen(), n_ships):
301+
# raise Exception(f"Error trying to send {n_ships} ships to fight.")
301302
else:
302303
Ship.scroll_ships()
303304
scroll_times += 1

0 commit comments

Comments
 (0)