#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define Y_MAX 30
#define X_MAX Y_MAX*4
#define MAX_TIME X_MAX
using namespace std;
int main(void)
{
char sheet[X_MAX][Y_MAX];
int chosen_x = 0;
int chosen_y = 0;
int x_direction = 0;
int y_direction = 0;
int old_x =0;
int old_y =0;
int x,y,z,w;
for(y=0;y<Y_MAX;++y)
for(x=0;x<X_MAX;++x)
sheet[x][y]='#';
system("clear");
for(w=Y_MAX;w<X_MAX;w=w+Y_MAX)
{
old_x=w;
for(z=1;z<=MAX_TIME;++z)
{
/*chosen for x */
srand(time(NULL));
int chosen = 0;
x_direction = rand() %3;
/*chosen for y */
system("sl
每日一个C++小程序【趣味篇】--C++绘画小程序
最新推荐文章于 2024-06-29 09:04:31 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)