PC.Games.2007.01

1

haveattach.gifpc.games.2007.01.part01.rar
(2006-12-24 09:37:56, Size: 1.91 MB, Downloads: 17)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/71047/viewspace-114514/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/71047/viewspace-114514/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是Python freegames.games的注释示例: ```python # Free Games library for Python # https://github.com/grantjenks/free-python-games # # Copyright (c) 2016 Grant Jenks # Licensed under the Apache License, Version 2.0 # # This library provides a framework for writing simple games in Python. # See the examples directory for several games that illustrate simple # use of the framework. # # The library provides a variety of modules including graphics, sound, # and input handling. # # The graphics module provides a simple interface for creating shapes, # images, and text on a window. The sound module supports loading and # playing WAV files. The input module provides a way to detect and # respond to input events including keyboard and mouse actions. import math import pygame # Define colors using RGB values BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) # Define window dimensions SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 # Initialize Pygame and create window pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption("My Game") # Loop until user clicks close button done = False while not done: # Check for events for event in pygame.event.get(): if event.type == pygame.QUIT: done = True # Fill the background with white screen.fill(WHITE) # Draw a rectangle pygame.draw.rect(screen, RED, [50, 50, 200, 100]) # Draw a circle pygame.draw.circle(screen, BLUE, [400, 300], 50) # Draw a line pygame.draw.line(screen, GREEN, [0, 0], [100, 100], 5) # Update the screen pygame.display.update() # Quit Pygame when done pygame.quit() ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值