Update main2048.py

main
hnu202309010107 6 months ago
parent 2dd848a131
commit f9f83c76f4

@ -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

Loading…
Cancel
Save