
项目
SmartDemo
加油,努力!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
无频闪的控制台小程序——贪吃蛇
#include<iostream> #include<vector> #include<random> #include<ctime> #include <Windows.h> #include"conio.h" const int height = 20; const int width = 20; using namespace std; class Snake { private: int len; int x ,y, foodx.原创 2020-08-04 19:04:30 · 224 阅读 · 0 评论 -
Maze generator(迷宫生成器)
一、迷宫满足条件 There are no circles in the maze, which means all roads in the maze lead to an dead end or to the exit. There are no wall blocks in the maze. Each wall is 1 unit in width, each road is also 1 unit in width. 二、伪代码 if this cell is out of boundar原创 2020-08-02 03:53:34 · 6739 阅读 · 0 评论 -
双缓存解决控制台频闪的问题
一、原始方法 System("cls");//存在频闪 二、改进 #include<iostream> #include "stdlib.h" #include <Windows.h> bool switchOver = false; const int width = 20; const int height = 20; HANDLE hOutput, hOutBuf;//控制台屏幕缓冲区句柄 COORD coord = { 0,0 }; //双缓冲处理显示...原创 2020-07-31 23:38:28 · 745 阅读 · 0 评论