Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C 语言课程设计综合题游戏

使用 SDL3 图形库编写贪吃蛇
窗口大小 600 * 800 需要依赖: SDL3 SDL_image SDL_ttf
ArchLinux 可运行以下命令进行安装:

sudo pacman -S sdl3 sdl3_image sdl3_ttf

使用 make 编译

目前进度:

课程设计第一天:
学会 SDL3 的使用
完成基本基本的贪吃蛇功能
课程设计第二天: 加了个分数栏

TODO

  • 蛇的图片
  • 分数栏
  • 死亡窗口
  • 分数存储

代码量

❯ git ls-files '*.cpp' '*.h' | xargs wc -l
   11 include/font.h
   10 include/food.h
   36 include/game.h
   23 include/snake.h
   12 include/win.h
    6 main.cpp
   81 src/font.cpp
   92 src/food.cpp
  108 src/game.cpp
  123 src/snake.cpp
  136 src/win.cpp
  638 total

结构

❯ tree
.
├── compile_commands.json
├── img
│   └── 1.png
├── include
│   ├── font.h
│   ├── food.h
│   ├── game.h
│   ├── snake.h
│   └── win.h
├── main.cpp
├── Makefile
├── readme.md
├── sources
│   ├── apple.png
│   ├── background.png
│   └── SourceHanSansCN-Normal.otf
└── src
    ├── font.cpp
    ├── food.cpp
    ├── game.cpp
    ├── snake.cpp
    └── win.cpp

5 directories, 18 files

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages