|
|
@ -122,6 +122,7 @@ def _LEFT():
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
elif game_lis[i][j] == game_lis[i][k]:
|
|
|
|
elif game_lis[i][j] == game_lis[i][k]:
|
|
|
|
game_lis[i][j] *= 2
|
|
|
|
game_lis[i][j] *= 2
|
|
|
|
|
|
|
|
score+=game_lis[i][j]
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
@ -139,6 +140,7 @@ def _RIGHT():
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
elif game_lis[i][j] == game_lis[i][k]:
|
|
|
|
elif game_lis[i][j] == game_lis[i][k]:
|
|
|
|
game_lis[i][j] *= 2
|
|
|
|
game_lis[i][j] *= 2
|
|
|
|
|
|
|
|
score+=game_lis[i][j]
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
game_lis[i][k] = 0
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
@ -158,6 +160,7 @@ def _UP():
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
elif game_lis[k][i] == game_lis[j][i]:
|
|
|
|
elif game_lis[k][i] == game_lis[j][i]:
|
|
|
|
game_lis[j][i] *= 2
|
|
|
|
game_lis[j][i] *= 2
|
|
|
|
|
|
|
|
score+=game_lis[j][i]
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
@ -173,6 +176,7 @@ def _DOWN():
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
elif game_lis[j][i] == game_lis[k][i]:
|
|
|
|
elif game_lis[j][i] == game_lis[k][i]:
|
|
|
|
game_lis[j][i] *= 2
|
|
|
|
game_lis[j][i] *= 2
|
|
|
|
|
|
|
|
score+=game_lis[j][i]
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
game_lis[k][i] = 0
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|