2021-9-29-pygame

发布时间 2023-09-17 20:47:14作者: Yecgaa1
layout: post
title: pygame五子棋
categories: 日志
tags: 
    - 日志 
    - 大二
BGImage: 'https://github.xutongxin.me/https://raw.githubusercontent.com/xutongxin1/PictureBed/master/img0/20220310123346.png'
jekyll-theme-WuK:
    musicid: '34367899'

速记有效信息用

pygame 主函数库

pygame-Ai 操作移动ai用,此处无效

clock.tick()刷新帧率

event方法包含了一套状态机,而不应该自己写一套,且该状态机可以被自定义

https://www.pygame.org/docs/ref/event.html#pygame.event.get

AI方案使用每个点的分数判别

对斜边先组合字符串使用find函数,对行列直接用pandas里的find

五子棋棋型

http://g.onegreen.net/wzq/HTML/142336.html

from pygame.examples.video import surf

<RendererDriverInfo(name: b'direct3d', flags: 0x0e, num_texture_formats: 1, max_texture_width: 0, max_texture_height: 0)>
<RendererDriverInfo(name: b'opengl', flags: 0x0e, num_texture_formats: 4, max_texture_width: 0, max_texture_height: 0)>
<RendererDriverInfo(name: b'opengles2', flags: 0x0e, num_texture_formats: 4, max_texture_width: 0, max_texture_height: 0)>
<RendererDriverInfo(name: b'software', flags: 0x09, num_texture_formats: 8, max_texture_width: 0, max_texture_height: 0)>

导致强制唤起了示例界面

需要删去

pygame.display.flip()和pygame.display.update()的区别

https://blog.csdn.net/Jason_WangYing/article/details/104933005