Skip to content

flycrane01/Snake-

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python(pygame) 贪吃蛇

main.py 100行代码的贪吃蛇

image

main_bfs.py 通过BFS自动规划到食物的最短路径 但是蛇身太长之后很容易找不到路径而死掉

main_bfs2.py 实现贪吃蛇AI,按照这个思路进行修改。code here

只是做了一些微小的修改,把curses改为pygame

to do list

  1. 蛇走过的路径看不清
  2. 可能会出现死循环

About

pygame 100行代码的贪吃蛇

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%