From a25ba2bfe4bc618e210264407f94f4c94c821bd8 Mon Sep 17 00:00:00 2001 From: yusuke bono Date: Tue, 3 Mar 2020 19:40:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?global=20cells=20cells=20=3D=20[]=20?= =?UTF-8?q?=EF=BC=92=E8=A1=8C=E3=82=92=20cells.clear()=E3=80=80=E3=81=AB?= =?UTF-8?q?=E7=BD=AE=E6=8F=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Eb4L.py | 3 +-- Ej7N.py | 3 +-- Jz5M.py | 3 +-- K8i6.py | 3 +-- Q3ga.py | 3 +-- Tw2y.py | 3 +-- Zy7E.py | 3 +-- e2NU.py | 3 +-- gW7F.py | 3 +-- hY4Z.py | 3 +-- rV5Q.py | 3 +-- u4Jc.py | 3 +-- 12 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Eb4L.py b/Eb4L.py index 4e37ed0..6e0d067 100644 --- a/Eb4L.py +++ b/Eb4L.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/Ej7N.py b/Ej7N.py index f7913a7..16c901a 100644 --- a/Ej7N.py +++ b/Ej7N.py @@ -92,8 +92,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/Jz5M.py b/Jz5M.py index c345d4f..7c7c40d 100644 --- a/Jz5M.py +++ b/Jz5M.py @@ -92,8 +92,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/K8i6.py b/K8i6.py index 8980927..8c7ab63 100644 --- a/K8i6.py +++ b/K8i6.py @@ -85,8 +85,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/Q3ga.py b/Q3ga.py index 725a250..fa329fe 100644 --- a/Q3ga.py +++ b/Q3ga.py @@ -85,8 +85,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/Tw2y.py b/Tw2y.py index ba1dde1..892fb4f 100644 --- a/Tw2y.py +++ b/Tw2y.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/Zy7E.py b/Zy7E.py index 4d6abec..096a249 100644 --- a/Zy7E.py +++ b/Zy7E.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/e2NU.py b/e2NU.py index c87223c..184563b 100644 --- a/e2NU.py +++ b/e2NU.py @@ -129,8 +129,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/gW7F.py b/gW7F.py index 157a19b..9900ca4 100644 --- a/gW7F.py +++ b/gW7F.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/hY4Z.py b/hY4Z.py index 3f48bf0..b293060 100644 --- a/hY4Z.py +++ b/hY4Z.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/rV5Q.py b/rV5Q.py index 62f9817..766368d 100644 --- a/rV5Q.py +++ b/rV5Q.py @@ -88,8 +88,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) diff --git a/u4Jc.py b/u4Jc.py index b296830..fcd081a 100644 --- a/u4Jc.py +++ b/u4Jc.py @@ -125,8 +125,7 @@ class ColorBase: END = '\033[0m' def set_cells(): - global cells - cells = [] + cells.clear() for cell in table: cells.append(cell.__dict__['name']) From a54bf80345e5f1ab801ba19d14c66238468def99 Mon Sep 17 00:00:00 2001 From: yusuke bono Date: Tue, 3 Mar 2020 20:09:21 +0900 Subject: [PATCH 2/2] Changed "global table" to "table.clear()" --- Dg8x.py | 2 +- E2cs.py | 2 +- Eb4L.py | 2 +- Ej7N.py | 2 +- Et2T.py | 2 +- G6kv.py | 2 +- Hv72.py | 2 +- Jz5M.py | 2 +- K8i6.py | 2 +- Q3ga.py | 2 +- R2yT.py | 2 +- Tw2y.py | 2 +- Zy7E.py | 2 +- d9Ke.py | 2 +- e2NU.py | 2 +- g2V9.py | 2 +- gW7F.py | 2 +- hD4V.py | 2 +- hY4Z.py | 2 +- rV5Q.py | 2 +- u4Jc.py | 2 +- v2Ps.py | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Dg8x.py b/Dg8x.py index 6255d20..5c7b00c 100644 --- a/Dg8x.py +++ b/Dg8x.py @@ -69,7 +69,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/E2cs.py b/E2cs.py index 6e2e02d..5b9531e 100644 --- a/E2cs.py +++ b/E2cs.py @@ -97,7 +97,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Eb4L.py b/Eb4L.py index 6e0d067..7a7e5a4 100644 --- a/Eb4L.py +++ b/Eb4L.py @@ -125,7 +125,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Ej7N.py b/Ej7N.py index 16c901a..6d99fc9 100644 --- a/Ej7N.py +++ b/Ej7N.py @@ -129,7 +129,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Et2T.py b/Et2T.py index dcc4a99..837fd72 100644 --- a/Et2T.py +++ b/Et2T.py @@ -91,7 +91,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/G6kv.py b/G6kv.py index 4401def..6925744 100644 --- a/G6kv.py +++ b/G6kv.py @@ -96,7 +96,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Hv72.py b/Hv72.py index fc6b154..ea7943e 100644 --- a/Hv72.py +++ b/Hv72.py @@ -72,7 +72,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Jz5M.py b/Jz5M.py index 7c7c40d..1d86b04 100644 --- a/Jz5M.py +++ b/Jz5M.py @@ -137,7 +137,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 2, 'red')) table.append(Cell('B', 2, 'black')) table.append(Cell('1', 8, 'red')) diff --git a/K8i6.py b/K8i6.py index 8c7ab63..040238c 100644 --- a/K8i6.py +++ b/K8i6.py @@ -122,7 +122,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Q3ga.py b/Q3ga.py index fa329fe..f55881a 100644 --- a/Q3ga.py +++ b/Q3ga.py @@ -122,7 +122,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/R2yT.py b/R2yT.py index 72f4871..d1b2df7 100644 --- a/R2yT.py +++ b/R2yT.py @@ -72,7 +72,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Tw2y.py b/Tw2y.py index 892fb4f..41bd52f 100644 --- a/Tw2y.py +++ b/Tw2y.py @@ -125,7 +125,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/Zy7E.py b/Zy7E.py index 096a249..4400898 100644 --- a/Zy7E.py +++ b/Zy7E.py @@ -105,7 +105,7 @@ def bet_players(): player.bet() def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/d9Ke.py b/d9Ke.py index 2e42eb1..860c55d 100644 --- a/d9Ke.py +++ b/d9Ke.py @@ -101,7 +101,7 @@ def bet_players(): player.bet() def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/e2NU.py b/e2NU.py index 184563b..53e0bd8 100644 --- a/e2NU.py +++ b/e2NU.py @@ -191,7 +191,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 2, 'red')) table.append(Cell('B', 2, 'black')) table.append(Cell('1', 8, 'red')) diff --git a/g2V9.py b/g2V9.py index 49efaf2..74b0493 100644 --- a/g2V9.py +++ b/g2V9.py @@ -69,7 +69,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/gW7F.py b/gW7F.py index 9900ca4..3d44f0c 100644 --- a/gW7F.py +++ b/gW7F.py @@ -113,7 +113,7 @@ def check_hit(): print(player.name + 'は当たり') def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/hD4V.py b/hD4V.py index a7ae348..3a47c30 100644 --- a/hD4V.py +++ b/hD4V.py @@ -69,7 +69,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/hY4Z.py b/hY4Z.py index b293060..7b7e8e6 100644 --- a/hY4Z.py +++ b/hY4Z.py @@ -125,7 +125,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/rV5Q.py b/rV5Q.py index 766368d..efd45be 100644 --- a/rV5Q.py +++ b/rV5Q.py @@ -119,7 +119,7 @@ def win_player(player, hit_cell_number): print(player.name + 'は当たり ' + str(win_coin) + 'コインを獲得しました。') def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red')) diff --git a/u4Jc.py b/u4Jc.py index fcd081a..f3a987e 100644 --- a/u4Jc.py +++ b/u4Jc.py @@ -187,7 +187,7 @@ def show_coin(): print(message) def create_table(): - global table + table.clear() table.append(Cell('R', 2, 'red')) table.append(Cell('B', 2, 'black')) table.append(Cell('1', 8, 'red')) diff --git a/v2Ps.py b/v2Ps.py index 82b2ae0..e3207d8 100644 --- a/v2Ps.py +++ b/v2Ps.py @@ -63,7 +63,7 @@ def create_players(): players = [human, computer1, computer2, computer3] def create_table(): - global table + table.clear() table.append(Cell('R', 8, 'red')) table.append(Cell('B', 8, 'black')) table.append(Cell('1', 2, 'red'))