
项目
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 · 217 阅读 · 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 · 6614 阅读 · 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 · 724 阅读 · 0 评论