当前位置: 移动技术网 > IT编程>脚本编程>Python > pygame实现俄罗斯方块游戏

pygame实现俄罗斯方块游戏

2019年06月16日  | 移动技术网IT编程  | 我要评论

我的黑帮大少,混乱武林加钱加速版,一吨柴油多少升

本文实例为大家分享了pygame实现俄罗斯方块的具体代码,供大家参考,具体内容如下

import random, time, pygame, sys
from pygame.locals import *

fps = 25
windowwidth = 640#整个游戏屏幕的宽
windowheight = 480#整个游戏屏幕的高
boxsize = 20#每个小格子的宽和高
boardwidth = 10#游戏窗口本身有10个方块的宽度
boardheight = 20#游戏窗口本身有20个方块的高度
blank = '.'#表示空白空格

#每当玩家按下向左或向右箭头键的时候,下落的砖块都应该分别向左或向右移动一个方块。然而,玩家也可以保持按住了向左箭头键或向右箭头键以使得下落的砖块持续移动。
movesidewaysfreq = 0.15 #按向左箭头键或向右箭头键每次持续按下超过0.15秒的时候,砖块相应的移动一个空格
movedownfreq = 0.1   #按向下头键每次持续按下超过0.1秒的时候,砖块向下一个空格
xmargin = int((windowwidth - boardwidth * boxsize) / 2)#(0indowwidth是总窗口的宽度-游戏界面一行上的方块个数*每个方块的宽度)/2窗口左边或右边剩下的像素数
topmargin = windowheight - (boardheight * boxsize) - 5#topmargin:游戏窗口上面剩下的像素数=总窗口的高度-(游戏界面一列上的方块个数*每个方块的高度)-5
#        r  g  b
white    = (255, 255, 255)#白色
gray    = (185, 185, 185)#灰色
black    = ( 0,  0,  0)#黑色
red     = (155,  0,  0)#红色
green    = ( 0, 155,  0)#绿色
blue    = ( 0,  0, 155)#蓝色
yellow   = (155, 155,  0)#黄色
bordercolor = blue#边界颜色
bgcolor = black#背景颜色
textcolor = white#文字颜色
colors   = (blue,green,red,yellow) #方块四种颜色,存于colors元组中
templatewidth = 5#砖块模板宽 
templateheight = 5#砖块模板高

s_shape_template = [['.....', #s形状的模板
           '.....',
           '..oo.',
           '.oo..',
           '.....'],
          ['.....', #s逆时针变化的形状
           '..o..',
           '..oo.',
           '...o.',
           '.....']]

z_shape_template = [['.....', #z形模板
           '.....',
           '.oo..',
           '..oo.',
           '.....'],
          ['.....',
           '..o..',
           '.oo..',
           '.o...',
           '.....']]

i_shape_template = [['..o..', #i型模板
           '..o..',
           '..o..',
           '..o..',
           '.....'],
          ['.....',
           '.....',
           'oooo.',
           '.....',
           '.....']]

o_shape_template = [['.....', #o型模板
           '.....',
           '.oo..',
           '.oo..',
           '.....']]

j_shape_template = [['.....', #j型模板
           '.o...',
           '.ooo.',
           '.....',
           '.....'],
          ['.....',
           '..oo.',
           '..o..',
           '..o..',
           '.....'],
          ['.....',
           '.....',
           '.ooo.',
           '...o.',
           '.....'],
          ['.....',
           '..o..',
           '..o..',
           '.oo..',
           '.....']]

l_shape_template = [['.....', #l型模板
           '...o.',
           '.ooo.',
           '.....',
           '.....'],
          ['.....',
           '..o..',
           '..o..',
           '..oo.',
           '.....'],
          ['.....',
           '.....',
           '.ooo.',
           '.o...',
           '.....'],
          ['.....',
           '.oo..',
           '..o..',
           '..o..',
           '.....']]

t_shape_template = [['.....', #t型模板
           '..o..',
           '.ooo.',
           '.....',
           '.....'],
          ['.....',
           '..o..',
           '..oo.',
           '..o..',
           '.....'],
          ['.....',
           '.....',
           '.ooo.',
           '..o..',
           '.....'],
          ['.....',
           '..o..',
           '.oo..',
           '..o..',
           '.....']]

pieces = {'s': s_shape_template, #pieces是一个字典,它储存了所有不同的模板(列表)。每个模板都拥有一个形状所有可能的旋转(列表)。
     'z': z_shape_template,
     'j': j_shape_template,
     'l': l_shape_template,
     'i': i_shape_template,
     'o': o_shape_template,
     't': t_shape_template}

def main(): #main()函数还负责创建了一些其他的全局常量,并且显示了在游戏运行的时候出现的初始屏幕。
  global fpsclock, displaysurf, basicfont, bigfont
  pygame.init()#在inport pygame之后 调用其他函数之前总要调用这个函数
  fpsclock = pygame.time.clock()#pygame.time.clock()创建pygame.time.clock对象
  displaysurf = pygame.display.set_mode((windowwidth, windowheight)) #pygame.display.set_mode()的参数是一个元组,该元祖中有两个参数,
  #即:创建窗口的宽和高,单位是像素,该函数返回pygame.surface对象
  basicfont = pygame.font.font('freesansbold.ttf', 18)#字体
  bigfont = pygame.font.font('freesansbold.ttf', 100)#字体
  pygame.display.set_caption('tetromino')#设置窗口标题
  showtextscreen('tetromino')#设置在开始界面显示的文字

  while true: #游戏循环,该游戏循坏会在一秒之内多次检查是否发生了任何新的事件,例如:点击鼠标或按下键盘
    pygame.mixer.music.load('tetrisc.mp3')#加载音乐 
    pygame.mixer.music.play(-1, 0.0)#播放音乐
    rungame()#调用rungame()开始游戏,当游戏失败的时候,rungame()将返回main(),
    pygame.mixer.music.stop()#然后main()会停止背景音乐
    showtextscreen('game over')#并显示游戏结束屏幕。当玩家按下一个键,showtextscreen()函数将返回,程序回到main()中的的第一行,重新开始游戏

def rungame():#实际的游戏代码都在rungame中
#在游戏开始并且砖块开始下落前,我们需要将一些变量初始化为游戏开始时候的值。
  board = getblankboard()#创建一个空白游戏板数据结构
  lastmovedowntime = time.time()#lastmovedowntime最后按向下方向键的时间
  lastmovesidewaystime = time.time()#lastmovesidewaystime最后按左右向键的时间
  lastfalltime = time.time()#最后下落砖块的时间
  movingdown = false #没有按下向下方向键
  movingleft = false #没有按下向左方向键
  movingright = false #没有按下向右方向键
  score = 0 #得分
  level, fallfreq = calculatelevelandfallfreq(score)#计算关卡数和下落频率,因为此时score=0,所以经计算后level=1,fallfreq=0.25
  fallingpiece = getnewpiece() #fallingpiece变量将设置为能够被玩家操作的当前下落的砖块
  nextpiece = getnewpiece() #nextpice为在屏幕的next部分出现的砖块,即下一个将要下落的砖块

  while true: # 游戏主循环,它负责砖块在落向底部的过程中,游戏主要部分的代码
    if fallingpiece == none:#在下落的砖块已经着陆之后,fallingpiece变量设置为none
      fallingpiece = nextpiece#这意味着nextpiece中的砖块将会复制到fallingpiece中。
      nextpiece = getnewpiece()#生成新的新的nextpiece砖块,砖块可以通过getnewpiece()函数生成。
      lastfalltime = time.time() #该变量也重新设置为当前时间,以便砖块能够在fallfreq中所设置的那么多秒之内下落。
      if not isvalidposition(board, fallingpiece):
         #但是,如果游戏板已经填满了,isvalidposition()将返回false,导致这是一个无效的位置,那么,我们知道游戏板已经填满了,玩家失败了。
        return #在这种情况下 rungame()函数将被返回。

    for event in pygame.event.get(): #事件处理循环负责玩家旋转下落的砖块,移动下落的砖块。
        #松开一个剪头键将会把movingleft或movingright或movingdown变量设置为false,表示玩家不再想
        #要让砖块朝着该方向移动。随后的代码将会根据这些“moving”变量中的boolean值来确定做什么。
      if event.type == keyup:#当按键弹起的时候响应keyup事件
        if (event.key == k_left):#判断当前弹起的按键是否为左方向键
          movingleft = false #是的话置为false,表示玩家不再想要让砖块朝着该方向移动。
        elif (event.key == k_right):#同上
          movingright = false
        elif (event.key == k_down):#同上
          movingdown = false

      elif event.type == keydown:#当按键按下的时候响应keydown事件
        if (event.key == k_left) and isvalidposition(board, fallingpiece, adjx=-1):
        #当按下的按键为向左方向键,并且向左移动一个位置有效
          fallingpiece['x'] = fallingpiece['x'] -1 #左移
          movingleft = true #将movingleft变量设置为true,并且为了确保落下的砖块不会既向左又向右移动
          movingright = false #将 movingright设置为false
          lastmovesidewaystime = time.time() #lastmovesidewaystime更改为当前时间
#设置了 movingleft,movingrigh以便玩家能够只是按住方向键以保持砖块移动。如果movingleft变量设置为true,程序就知道已经按下了向左箭头键并且没有松开它。

        elif (event.key == k_right ) and isvalidposition(board, fallingpiece, adjx=1): #同上
          fallingpiece['x'] =fallingpiece['x'] + 1
          movingright = true
          movingleft = false
          lastmovesidewaystime = time.time()

        #按向上箭头将会把砖块为其下一个旋转状态。代码所需要做的只是fallingpiece字典中的'rotation'键的值增加1。然而,如果增加'rotation'键的值
        #大于旋转的总数目,那么用该形状可能旋转的总数目(这就是len(pieces[fallingpiece['shape']的含义)来模除它,然后,这个值将回滚到从0开始。
        elif event.key == k_up :
          fallingpiece['rotation'] = (fallingpiece['rotation'] + 1) % len(pieces[fallingpiece['shape']])
          if not isvalidposition(board, fallingpiece):
          #由于新的旋转位置与游戏板上已有的一些方块重叠而导致新的旋转位置无效,那么,
          #我们想要通过从fallingpiece['rotation']减去1而切换回最初的旋转。我们也可以使用len(pieces[fallingpiece['shape']])来模除
          #它,以便如果新的值为-1,模除将其改为列表中的最后一次旋转。????
            fallingpiece['rotation'] = (fallingpiece['rotation'] - 1) % len(pieces[fallingpiece['shape']])

        #如果按下了向下键,说明玩家想要砖块下落得比正常速度更快一些。
        elif (event.key == k_down ):
          movingdown = true # movingdown设置为true
          if isvalidposition(board, fallingpiece, adjy=1):#下一个位置有效
            fallingpiece['y'] = fallingpiece['y'] +1 #移动
          lastmovedowntime = time.time() #lastmovedowntime重新设置为当前时间。随后将检查这些变量,以确保只要按下向下箭头键的时候,砖块就
          #会以较快的速率下降

    if (movingleft or movingright) and time.time() - lastmovesidewaystime > movesidewaysfreq:#movesidewaysfreq = 0.15 按向左或向右超过0.15秒
      if movingleft and isvalidposition(board, fallingpiece, adjx=-1):#如果是向左方向键,并且向左一个位置有效
        fallingpiece['x'] =fallingpiece['x'] - 1#左移动一个位置
      elif movingright and isvalidposition(board, fallingpiece, adjx=1):#如果是向右方向键,并且向左一个位置有效
        fallingpiece['x'] =fallingpiece['x'] + 1#右移动一个位置
      lastmovesidewaystime = time.time() #将lastmovesidewaystime更新为当前时间。

    if movingdown and time.time() - lastmovedowntime > movedownfreq and isvalidposition(board, fallingpiece, adjy=1):
    #movedownfreq = 0.1 按向下方向键超过0.1秒,并且向下一个位置有效
      fallingpiece['y'] = fallingpiece['y'] + 1#向下移动一个位置
      lastmovedowntime = time.time()#将laslastmovedowntime更新为当前时间。

    #让砖块自然落下
    if time.time() - lastfalltime > fallfreq:#fallfreq向下移动的速率
      if not isvalidposition(board, fallingpiece, adjy=1):#当砖块下一个位置无效时,即表示砖块当前已经着陆了。
        addtoboard(board, fallingpiece) #在游戏板数据结构中记录这个着陆的砖块
        score=score + removecompletelines(board)# removecompletelines()将负责删除掉游戏板上任何已经填充完整的行,并且将方块向下推动。
        #removecompletelines()函数还会返回一个整数值,表明消除了多少行,以便我们将这个数字加到得分上。
        level, fallfreq = calculatelevelandfallfreq(score)#由于分数已经修改了,我们调用calculatelevelandfallfreq()函数来更新当前的关卡以及砖块下落得频率。
        fallingpiece = none#最后我们将fallingpiece变量设置为none,以表示下一个砖块应该变为新的下落砖块,并且应该生成一个随机的新砖块作为下一个砖块。??????
      else:
        # 如果砖块没有着陆,我们直接将其y位置向下设置一个空格,并且将lastfalltime重置为当前时间
        fallingpiece['y'] = fallingpiece['y'] +1
        lastfalltime = time.time()

    # drawing everything on the screen
    displaysurf.fill(bgcolor)
    drawboard(board)
    drawstatus(score, level)
    drawnextpiece(nextpiece)
    if fallingpiece != none:#砖块没有下落到底部
      drawpiece(fallingpiece)
    pygame.display.update()
    fpsclock.tick(fps)

def maketextobjs(text, font, color):
  surf = font.render(text, true, color)
  return surf, surf.get_rect()

def checkforkeypress():
  # checkforkeypress()函数和它在wormy游戏中所做的事件相同。首先,它调用checkforquit()来处理任何的quit事件(或者是专门针对esc键的keyup事件),如果有任何这样的事件
  #就会终止程序。然后,它从事件队列中提取出所有的keydown, keyup事件。它会忽略掉任何的keydown事件(针对pygame.event.get()指定了keydown,从而从事件队列中清除掉该类事件)。
  #如果事件队列中没有keyup事件,那么该函数返回none。
  for event in pygame.event.get([keydown, keyup]):
    if event.type == keydown:
      continue
    return event.key
  return none

def calculatelevelandfallfreq(score):#每次玩家填满一行,起分数都将增加1分。每增加10分,游戏就进入下一个关卡,砖块下落得会更快。关卡和下落的频率都是通过传递
  level = int(score / 10) + 1 #给该函数的分数来计算的。要计算关卡,我们使用int()来舍入除以10以后的分数。因此如果分数是0-9之间的任何数字,int()调用会将其
  fallfreq = 0.27 - (level * 0.02) #舍入到0。代码这里的+1部分,是因为我们想要第一个关卡作为第一关,而不是第0关。当分数达到10分的时候,int(10/10)将会计算为1
  return level, fallfreq #并且+1将会使得关卡变为2
  #为了计算下落的频率,我们首先有一个基准值0.27(这意味着每0.27秒,砖块会自然地下落一次)。然后,我们将关卡值乘以0.02,并且从基准时间0.27中减去它。因此,对于关卡1,
  #我们从0.27中减去0.02*1得到0.25。在关卡2中我们减去0.02*2得到0.23。对于每一个关卡来说,砖块下落的速度都比之前的关卡块了0.02秒。

#getnewpiece()函数产生一个随机的砖块,放置于游戏板的顶部(设置'y'=-2)。
def getnewpiece():
  shape = random.choice(list(pieces.keys()))#pieces是一个字典,它的键为代表形状的字母,值为一个形状所有可能的旋转(列表的列表)。
  #pieces.keys()返回值是(['z','j','l','i','o','t'])的元组,list(pieces.keys())返回值是['z','j','l','i','o','t']列表
  #这样转换是因为random.choice()函数只接受列表值作为其参数。 random.choice()函数随机地返回列表中的一项的值,即可能是'z'。
  newpiece = {'shape': shape,
        'rotation': random.randint(0, len(pieces[shape]) - 1), #rotation:随机出砖块是多个旋转形装的哪个
        #pieces['z']的返回值为[[形状],[形状]],len(pieces['z'])的返回值为2 2-1=1 random.randint(0,1)随机范围是[0,1]
        'x': int(boardwidth / 2) - int(templatewidth / 2), #'x'代表砖块5x5数据结构左上角第一个方格的横坐标,键的值总是要设置为游戏板的中间。
        'y': -2, #'x'代表砖块5x5数据结构左上角第一个方格的纵坐标,'y'键的值总是要设置为-2以便将其放置到游戏板上面一点点(游戏板的首行是0行)
        'color': random.randint(0, len(colors) - 1)#colors:不同颜色的一个元组
        }
  return newpiece#getnewpiece()函数返回newpiece字典

#给游戏板数据结构添加砖块
def addtoboard(board, piece): #游戏板数据结构用来记录之前着陆的砖块。该函数所做的事情是接受一个砖块数据结构,并且将其上的有效砖块添加到游戏板数据结构中
  for x in range(templatewidth): #该函数这在一个砖块着陆之后进行
    for y in range(templateheight):#嵌套for遍历了5x5砖块数据结构,当找到一个有效砖块时,将其添加到游戏板中
      if pieces[piece['shape']][piece['rotation']][y][x] != blank:
        board[x + piece['x']][y + piece['y']] = piece['color'] #游戏板数据结构的值有两种形式:数字(表示砖块颜色),'.'即空白,表示该处没有有效砖块

def getblankboard(): #创建一个新的游戏板数据结构。
  board = [] #创建一个空白的游戏板
  for i in range(boardwidth):# range(10)=[0,9]  boardwidth=10  blank = '.' #表示空白空格
    board.append([blank] * boardheight)
  #board[0]-board[9]每一个变量的值都是20个.组成的列表  
  return board

def isonboard(x, y):#isonboard()函数检查参数x,y坐标是否存在于游戏板上
  return x >= 0 and x < boardwidth and y < boardheight#boardwidth=10,boardheight=20

def isvalidposition(board, piece, adjx=0, adjy=0):#board:游戏板 piece:砖块 adjx,adjy表示5x5砖块左上角方块的坐标
#isvalidpositio,n()如果砖块中所有的方块都在游戏板上并且没有和游戏板上任何方块重叠,那么返回true
#isvalidposition()函数还有名为adjx和adjy的可选参数。通常,isvalidposition()函数检查作为第二个参数传递的砖块对象所提供的位置数据(此时adjx=0, adjy=0)。
#然而,有时候我们不想要检查砖块的当前位置,而是要检查该位置之上的一些空格
##如果给adjx递-1.那么它不会检查砖块的数据结构中的位置的有效性,而是检查砖块所处的位置的左边一个空格是否是有效的。
#给adjx传递1的话,将会检查砖块右边的一个空格。还有一个可选的adjy参数。传递-1给adjy,将会检查砖块当前所处位置的上面一个空格,
#而给adjy传递值3将会检查砖块所在位置下面的3个空格。
  for x in range(templatewidth): #templatewidth=5 templatewidth=5
    for y in range(templateheight):# 遍历砖块模板的所有方块
      isaboveboard = y + piece['y'] + adjy < 0 #模板还没完全进入游戏板
      if isaboveboard or pieces[piece['shape']][piece['rotation']][y][x] == blank:#在5x5模板中不等于'.'的方块,即有效方块
        continue
      if not isonboard(x + piece['x'] + adjx, y + piece['y'] + adjy):#有效砖块不在游戏板上
        return false
      if board[x + piece['x'] + adjx][y + piece['y'] + adjy] != blank:#有效砖块和游戏板上的方块重叠
        return false
  return true

def iscompleteline(board, y):#判断y行是否填满,填满返回true
  for x in range(boardwidth):#遍历该行的所有砖块
    if board[x][y] == blank:#如果存在空白,则没填满
      return false
  return true

def removecompletelines(board):#删除所有填满行,每删除一行要将游戏板上该行之上的所有方块都下移一行。返回删除的行数
  numlinesremoved = 0
  y = boardheight - 1 # boardheight=20-1=19即从最低行开始
  while y >= 0:#注意当删除一行时y没有生变化,因为此时它的值已经更新为新的一行了
    if iscompleteline(board, y):#如果该行填满
      for pulldowny in range(y, 0, -1): #range(y, 0, -1)范围[y,1]
        for x in range(boardwidth):
          board[x][pulldowny] = board[x][pulldowny-1]#将删除的行之上的每一行的值都复制到下一行
      for x in range(boardwidth):#删除第一行
        board[x][0]=blank
      numlinesremoved=numlinesremoved+1
    else:
      y =y- 1 #移到下一行
  return numlinesremoved

def converttopixelcoords(boxx, boxy):#将游戏板上方块的坐标转化成像素坐标
  return (xmargin + (boxx * boxsize)), (topmargin + (boxy * boxsize))#xmargin为游戏板左顶点的横坐标,topmargin为游戏板左顶点的纵坐标

def drawboard(board):#绘制游戏板边界
  pygame.draw.rect(displaysurf, bordercolor, (xmargin - 3, topmargin - 7, (boardwidth * boxsize) + 8, (boardheight * boxsize) + 8), 5)
  #pygame.draw.rect(displaysurf对象,red颜色,(x,y,width,height),线的宽度) rect:矩形 x,y表示左上角的坐标 width表示矩形的宽度 height表示高度
  #线的宽度为0(默认)表示全部填充,为1会画很细的线
  pygame.draw.rect(displaysurf, bgcolor, (xmargin, topmargin, boxsize * boardwidth, boxsize * boardheight)) #填充游戏板的背景颜色
  for x in range(boardwidth):#遍历游戏板
    for y in range(boardheight):
      drawbox(x, y, board[x][y])#这个函数会自动找出有效方块并绘制

#绘制一个砖块的一个有效方块(每个砖块有个有效方块)
def drawbox(boxx, boxy, color, pixelx=none, pixely=none):#绘制一个有效方块
  if color == blank: #如果这不是一个有效方块,这是5x5一个空白
    return
  if pixelx == none and pixely == none:
    pixelx, pixely = converttopixelcoords(boxx, boxy)#将游戏板上方块的坐标转化成像素坐标
  pygame.draw.rect(displaysurf, colors[color], (pixelx + 1, pixely + 1, boxsize - 1, boxsize - 1))#留出1像素的空白,这样才能在砖块中看到组成砖块
  #的有效方块,不然砖块看起来就只有一片颜色。

#绘制一个砖块
def drawpiece(piece, pixelx=none, pixely=none):#pixelx, pixely为5x5砖块数据结构左上角在游戏板上的的坐标
  shapetodraw = pieces[piece['shape']][piece['rotation']]#pieces[piece['shape']][piece['rotation']]为一个图形的一种旋转方式
  if pixelx == none and pixely == none: 
  #然而,'next'砖块并不会绘制到游戏板上。在这种情况下,我们忽略砖块数据结构中包含的位置信息,而是让drawpiece()函数的调用者
#为pixelx何pixely参数传递实参,以指定应该将砖块确切地绘制到窗口上的什么位置。
    pixelx, pixely = converttopixelcoords(piece['x'], piece['y'])#将砖块坐标转换为像素坐标。
  for x in range(templatewidth): #遍历5x5砖块数据结构
    for y in range(templateheight):
      if shapetodraw[y][x] != blank:
        drawbox(none, none, piece['color'], pixelx+(x * boxsize), pixely + (y * boxsize))
        #还记得吗?有效方块左上角在游戏板中的坐标=有效方块左上角在方块板数据结构中的坐标+方块数据额结构左上角在游戏板中的坐标,这里这不过换成了像素格式

def drawnextpiece(piece):
  nextsurf = basicfont.render('next:', true, textcolor)
  nextrect = nextsurf.get_rect()
  nextrect.topleft = (windowwidth - 120, 80)
  displaysurf.blit(nextsurf, nextrect)
  drawpiece(piece, pixelx=windowwidth-120, pixely=100)

def drawstatus(score, level):
  scoresurf = basicfont.render('score: %s' % score, true, textcolor)
  scorerect = scoresurf.get_rect()
  scorerect.topleft = (windowwidth - 150, 20)
  displaysurf.blit(scoresurf, scorerect)
  levelsurf = basicfont.render('level: %s' % level, true, textcolor)
  levelrect = levelsurf.get_rect()
  levelrect.topleft = (windowwidth - 150, 50)
  displaysurf.blit(levelsurf, levelrect)

def showtextscreen(text):
  titlesurf, titlerect = maketextobjs(text, bigfont, textcolor)
  titlerect.center = (int(windowwidth / 2) - 3, int(windowheight / 2) - 3)
  displaysurf.blit(titlesurf, titlerect)
  presskeysurf, presskeyrect = maketextobjs('press a key to play.', basicfont, textcolor)
  presskeyrect.center = (int(windowwidth / 2), int(windowheight / 2) + 100)
  displaysurf.blit(presskeysurf, presskeyrect)
  while checkforkeypress() == none:
    pygame.display.update()
    fpsclock.tick()

if __name__ == '__main__':
  main()

这里写图片描述

这里写图片描述

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网