 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http://wiki.sseuu.com/index.php?action=history&amp;feed=atom&amp;title=%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80%E7%BC%96%E5%87%BA%E6%9D%A5%E7%9A%84Python%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97%E6%B8%B8%E6%88%8F%E4%BB%A3%E7%A0%81</id>
		<title>文心一言编出来的Python俄罗斯方块游戏代码 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.sseuu.com/index.php?action=history&amp;feed=atom&amp;title=%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80%E7%BC%96%E5%87%BA%E6%9D%A5%E7%9A%84Python%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97%E6%B8%B8%E6%88%8F%E4%BB%A3%E7%A0%81"/>
		<link rel="alternate" type="text/html" href="http://wiki.sseuu.com/index.php?title=%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80%E7%BC%96%E5%87%BA%E6%9D%A5%E7%9A%84Python%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97%E6%B8%B8%E6%88%8F%E4%BB%A3%E7%A0%81&amp;action=history"/>
		<updated>2026-05-05T16:21:54Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wiki.sseuu.com/index.php?title=%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80%E7%BC%96%E5%87%BA%E6%9D%A5%E7%9A%84Python%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97%E6%B8%B8%E6%88%8F%E4%BB%A3%E7%A0%81&amp;diff=119916&amp;oldid=prev</id>
		<title>江南仁：创建页面，内容为“ import pygame    import random      初始化Pygame      pygame.init()       # 设置游戏窗口大小      screen_width, screen_height = 800, 600   screen = pygam...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.sseuu.com/index.php?title=%E6%96%87%E5%BF%83%E4%B8%80%E8%A8%80%E7%BC%96%E5%87%BA%E6%9D%A5%E7%9A%84Python%E4%BF%84%E7%BD%97%E6%96%AF%E6%96%B9%E5%9D%97%E6%B8%B8%E6%88%8F%E4%BB%A3%E7%A0%81&amp;diff=119916&amp;oldid=prev"/>
				<updated>2023-03-20T04:01:21Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“ import pygame    import random      初始化Pygame      pygame.init()       # 设置游戏窗口大小      screen_width, screen_height = 800, 600   screen = pygam...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt; import pygame  &lt;br /&gt;
 import random  &lt;br /&gt;
 &lt;br /&gt;
 初始化Pygame  &lt;br /&gt;
 &lt;br /&gt;
 pygame.init()  &lt;br /&gt;
  &lt;br /&gt;
 # 设置游戏窗口大小 &lt;br /&gt;
  &lt;br /&gt;
 screen_width, screen_height = 800, 600 &lt;br /&gt;
 screen = pygame.display.set_mode((screen_width, screen_height))  &lt;br /&gt;
  &lt;br /&gt;
 # 设置游戏标题  &lt;br /&gt;
 pygame.display.set_caption(&amp;quot;Russian Blocks&amp;quot;)  &lt;br /&gt;
   &lt;br /&gt;
 # 设置游戏速度  &lt;br /&gt;
 &lt;br /&gt;
 clock = pygame.time.Clock()  &lt;br /&gt;
   &lt;br /&gt;
 # 定义方块类 &lt;br /&gt;
 &lt;br /&gt;
 class Block:  &lt;br /&gt;
    def __init__(self, x, y):  &lt;br /&gt;
        self.x = x  &lt;br /&gt;
        self.y = y  &lt;br /&gt;
        self.vx = random.randint(-1, 1)  &lt;br /&gt;
        self.vy = random.randint(-1, 1)  &lt;br /&gt;
        self.color = (255, 255, 255)  &lt;br /&gt;
        self.thickness = random.randint(1, 5)  &lt;br /&gt;
  &lt;br /&gt;
    def update(self):  &lt;br /&gt;
        self.vx += self.vy  &lt;br /&gt;
        self.vy += self.vx  &lt;br /&gt;
        self.x += self.vx * self.thickness  &lt;br /&gt;
        self.y += self.vy * self.thickness  &lt;br /&gt;
  &lt;br /&gt;
    def draw(self, surface):  &lt;br /&gt;
        pygame.draw.rect(surface, self.color, (self.x, self.y, self.width, self.height))  &lt;br /&gt;
  &lt;br /&gt;
 # 定义方块列表  &lt;br /&gt;
 blocks = []  &lt;br /&gt;
   &lt;br /&gt;
 # 定义方块位置  &lt;br /&gt;
 x = 0  &lt;br /&gt;
 y = 0  &lt;br /&gt;
   &lt;br /&gt;
 # 定义方块颜色  &lt;br /&gt;
 colors = [(255, 255, 255), (0, 0, 0), (255, 0, 0), (0, 255, 0), (255, 255, 255)]  &lt;br /&gt;
   &lt;br /&gt;
 # 定义方块列表  &lt;br /&gt;
 for i in range(100):  &lt;br /&gt;
    x += random.randint(-50, 50)  &lt;br /&gt;
    y += random.randint(-50, 50)  &lt;br /&gt;
    block = Block(x, y)  &lt;br /&gt;
    blocks.append(block)  &lt;br /&gt;
  &lt;br /&gt;
 # 游戏循环  &lt;br /&gt;
 while True:  &lt;br /&gt;
    # 处理事件  &lt;br /&gt;
    for event in pygame.event.get():  &lt;br /&gt;
        if event.type == pygame.QUIT:  &lt;br /&gt;
  游戏中有100个方块，每个方块都有一个随机的位置和颜色。玩家需要通过控制方块的位置和速度来消除方块，最终达到游戏的目标。&lt;/div&gt;</summary>
		<author><name>江南仁</name></author>	</entry>

	</feed>