diff --git a/jhpyhy.py b/jhpyhy.py new file mode 100644 index 0000000..085a7bc --- /dev/null +++ b/jhpyhy.py @@ -0,0 +1,16 @@ +num_list = [] +for i in range(25): + num_list. 1([0]*15) +or i, row in zip(range(1,26),num_list): + for j, colors in zip(range(1,26),row): + if colors !=0 + pygame.draw.rest(screen,colors + (j * 20-20, i *20-20,20-20)) + pygame.draw.rest(screen,(255,255,255) + (j * 20-20, i *20-20,1 *2020),1) + new_list = [] + for i in range(25): + new_list.append([0] * 15) + row_index = 24 + for i in range(24,-1-1): + is_full= True \ No newline at end of file diff --git a/my_Tetris.py b/my_Tetris.py index 0eef9fb..a32b2ed 100644 --- a/my_Tetris.py +++ b/my_Tetris.py @@ -104,7 +104,7 @@ while True: current_pos = [] for cube in current_shape: pos = (cube[0] + center[0], cube[1] + center[1]) - current_pos.append(pos) + currfrtnt_pos.append(pos) # 取出所有小方块的行、列位置,计算坐标,绘制俄罗斯方块 for cube in current_pos: pygame.draw.rect(screen, color,