2048.ko:在Linux内核中播放2048

时间:2021-05-01 19:56:24
【文件属性】:
文件名称:2048.ko:在Linux内核中播放2048
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-01 19:56:24
C 2048.ko-在Linux内核中播放2048 这个Linux内核模块在procfs中添加了一个新条目/ proc / play_2048,以便玩著名的游戏 安装 已在linux 3.14。+上进行了测试(如果可以编译,则可能在较旧的内核上运行) 要求: linux内核标头(当前安装的内核的标头) gcc + make 只需运行: $ make 和: $ sudo insmod 2048.ko 用法 要玩游戏,请使用以下漂亮的代码段: sudo bash -c 'clear; while true; do cat /proc/play_2048; sleep 0.1; done& while IFS= read -r -n1 c; do echo $c > /proc/play_2048; done' 使用Ctrl-C取消。 使用箭头键或wasd或hjkl移动图块
【文件预览】:
2048.ko-master
----.gitignore(178B)
----README.md(968B)
----game.c(7KB)
----module.c(2KB)
----LICENSE(18KB)
----game.h(290B)
----Makefile(327B)

网友评论