源码贪吃蛇

本文素材来源于GitHub,仅供技术分享所用,不作商用。欢迎大家关注我的公众号: gbxiao992

quinesnake

A quine that plays snake over its own source!

在这里插入图片描述

How to run it

The program compiles itself; to run it first make the source file executable
(chmod +x quinesnake.cpp), then run it with ./quinesnake.cpp. It invokes
g++ on itself and then starts the game.

The snake is controlled with w, a, s and d.

quinesnake.cpp

This is the quine version that also compiles itself and plays snake over its
own source. It requires:

  • libcurses
  • Some binary called g++ needs to exist (tested with GCC and Clang)
  • /bin/ls needs to exist and be executable

quinesnake-commented.cpp

This version of the program isn’t a quine and doesn’t compile itself, but it
has all of the basic game-playing logic that the real version has, plus it’s
commented and readable.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值