Skip to content

Commit 56f2609

Browse files
committed
Update python_easy_chess_gui.py
* Remove book Get Settings menu. Set Book menu is enough as it already has a complete info on the book.
1 parent 4a8d97b commit 56f2609

1 file changed

Lines changed: 3 additions & 29 deletions

File tree

python_easy_chess_gui.py

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353

5454
APP_NAME = 'Python Easy Chess GUI'
55-
APP_VERSION = 'v0.68'
55+
APP_VERSION = 'v0.69'
5656
BOX_TITLE = '{} {}'.format(APP_NAME, APP_VERSION)
5757

5858

@@ -208,7 +208,7 @@
208208
['Boar&d', ['Flip']],
209209
['&Engine', ['Set Engine', 'Set Depth',
210210
'Set Movetime', 'Get Settings::engine_info_k']],
211-
['&Book', ['Set Book::book_set_k', 'Get Settings::book_info_k']],
211+
['&Book', ['Set Book::book_set_k']],
212212
['&Help', ['About']],
213213
]
214214

@@ -224,7 +224,7 @@
224224
['&Engine', ['Go', 'Set Engine', 'Set Depth',
225225
'Set Movetime', 'Get Settings::engine_info_k',
226226
'Unhide Search Info']],
227-
['&Book', ['Set Book::book_set_k', 'Get Settings::book_info_k']],
227+
['&Book', ['Set Book::book_set_k']],
228228
['&Help', ['About']],
229229
]
230230

@@ -834,16 +834,6 @@ def get_engine_settings(self, engine_id_name):
834834
'Engine = {}\nThreads = {}\nHash = {} mb\nDepth = {}\nMovetime = {} sec'.format(
835835
engine_id_name, self.threads, self.hash, self.max_depth,
836836
self.max_time), title=BOX_TITLE, keep_on_top=True)
837-
838-
def get_book_settings(self):
839-
""" Display GUI book settings """
840-
sg.PopupOK('Book = {}\nUse Book = {}\nBest move = {}\nRandom move = {}\nMax Ply = {}'. \
841-
format(self.gui_book_file,
842-
'Yes' if self.is_use_gui_book else 'No',
843-
'No' if self.is_random_book else 'Yes',
844-
'Yes' if self.is_random_book else 'No',
845-
self.max_book_ply),
846-
title=BOX_TITLE, keep_on_top=True)
847837

848838
def play_game(self, engine_id_name, board):
849839
"""
@@ -889,12 +879,6 @@ def play_game(self, engine_id_name, board):
889879
self.menu_elem.Update(new_menu)
890880
continue
891881

892-
# Allow user to view book settings when engine is to move
893-
# on its first move in Play mode
894-
if button == 'Get Settings::book_info_k':
895-
self.get_book_settings()
896-
continue
897-
898882
# Allow user to change book settings when engine is to move
899883
# on its first move in Play mode
900884
if button == 'Set Book::book_set_k':
@@ -1180,11 +1164,6 @@ def play_game(self, engine_id_name, board):
11801164
engine_id=self.get_engine_id_name())
11811165
continue
11821166

1183-
# Allow user to view book settings when user is to move in Play mode
1184-
if button == 'Get Settings::book_info_k':
1185-
self.get_book_settings()
1186-
continue
1187-
11881167
# Allow user to change book settings when user is to move in Play mode
11891168
if button == 'Set Book::book_set_k':
11901169
# Backup current values, we will restore these value in case
@@ -1895,11 +1874,6 @@ def main_loop(self):
18951874
self.set_time_limit()
18961875
continue
18971876

1898-
# Allow user to view book settings in Neutral mode
1899-
if button == 'Get Settings::book_info_k':
1900-
self.get_book_settings()
1901-
continue
1902-
19031877
# Allow user to change book settings in Neutral mode
19041878
if button == 'Set Book::book_set_k':
19051879
# Backup current values, we will restore these value in case

0 commit comments

Comments
 (0)