
C++新手小游戏
皮皮牛牛
西南大学在读机械硕士
展开
-
2021-11-16跳高高小游戏进阶版,新增随机障碍物,详细注解
#include <iostream> #include <conio.h> #include <windows.h> #include <stdlib.h> #include <string> #include <ctime> using namespace std; bool gameOver;//判断游戏开始结束 ///////分数//////// int score; //////障碍物随机数////// int m=1,.原创 2021-11-16 10:43:02 · 226 阅读 · 0 评论 -
C++跳高高小游戏初级版,带详细注释,简单易懂
#include <iostream> #include <conio.h> #include <windows.h> using namespace std; bool gameOver;//判断游戏开始结束 int score,m; //////声明函数//////// void Setup(); void Draw(); void Input(); void Logic(); ////////地图范围/////// const int width = 40; .原创 2021-11-03 22:12:05 · 3501 阅读 · 0 评论 -
c++简易贪吃蛇程序(主打一个入手快,易懂,有成就感嘿嘿)
#include <iostream> #include <conio.h> #include <windows.h> #include <cstdio>//C using namespace std; bool gameOver;//布尔判断游戏是否结束 const int width = 40;//画板40*20 const int height = 20; int x, y, fruitx, fruity, score; int tailX[100].原创 2021-11-02 22:09:47 · 8802 阅读 · 6 评论 -
2021-11-01
分享C++写的一个骰子对战小游戏,源码如下: #include <iostream> #include <stdlib.h> #include <string> const int a=1; const int b=6; const int m=5; using namespace std; int main(int argc, char **argv) { int x,x1; int y; string name1,name2; srand((unsign原创 2021-11-01 11:18:36 · 2135 阅读 · 2 评论