From f9f83c76f4ed7fb2f8276f41c06f88b3d4bef987 Mon Sep 17 00:00:00 2001 From: hnu202309010107 <2215403613@qq.com> Date: Sun, 26 May 2024 23:08:11 +0800 Subject: [PATCH] Update main2048.py --- main2048.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main2048.py b/main2048.py index ae2b6d0..ab7f3b3 100644 --- a/main2048.py +++ b/main2048.py @@ -122,6 +122,7 @@ def _LEFT(): game_lis[i][k] = 0 elif game_lis[i][j] == game_lis[i][k]: game_lis[i][j] *= 2 + score+=game_lis[i][j] game_lis[i][k] = 0 break @@ -139,6 +140,7 @@ def _RIGHT(): game_lis[i][k] = 0 elif game_lis[i][j] == game_lis[i][k]: game_lis[i][j] *= 2 + score+=game_lis[i][j] game_lis[i][k] = 0 break @@ -158,6 +160,7 @@ def _UP(): game_lis[k][i] = 0 elif game_lis[k][i] == game_lis[j][i]: game_lis[j][i] *= 2 + score+=game_lis[j][i] game_lis[k][i] = 0 break @@ -173,6 +176,7 @@ def _DOWN(): game_lis[k][i] = 0 elif game_lis[j][i] == game_lis[k][i]: game_lis[j][i] *= 2 + score+=game_lis[j][i] game_lis[k][i] = 0 break