zoukankan      html  css  js  c++  java
  • python3.7-初学篇-17

    import sys
    import pygame
    def run_game():
      #initialize game and create a dispaly object
      pygame.init()
      screen = pygame.display.set_mode((1200,800))
      pygame.display.set_caption("Alien Invasion")
      # set backgroud color
      bg_color = (230,230,230)

      # game loop
      while True:
        # supervise keyboard and mouse item
        for event in pygame.event.get():
          if event.type == pygame.QUIT:
            sys.exit()
        # fill color
        screen.fill(bg_color)
        # visualiaze the window
        pygame.display.flip()
    run_game( )

  • 相关阅读:
    jqGrid表格控件的学习
    list 集合筛选数据
    MySQL跨域
    11-Index页面
    11-Comment页面
    11-Add页面
    11-UploadFile
    11-控制器UI
    11-控制器
    11-数据访问层
  • 原文地址:https://www.cnblogs.com/liangbannerhulk/p/10105420.html
Copyright © 2011-2022 走看看