猫史档案馆


RendexORE

RendexORE

Lv.1

RendexORE,一个可怜的Minecraft-Java腐竹

获赞:230收藏:10浏览:1933作品收藏:24

签名:我的Sinox OS PT

回复帖子评论
上一页2 页 / 共 2下一页

请问有人会C++吗?我九月要考csp,(紧张.exe) 中回复

我会会会会

2024-07-09T16:52:42 点赞:0

用尽可能简短的文本来概括楼下的头像~ 中回复

有耳朵的人

2024-07-09T18:14:45 点赞:0

kitten4.0可以用什么游览器 中回复

我在这里列出4个常用浏览器的检测:

Opera

center_image

Firefox

center_image

Microsoft Edge

center_image

Google Chrome

center_image

2024-07-09T22:27:27 点赞:0

这段代码感觉没有错,却有错,为什么呢? 中回复

truepsw = ""
psw = "123456"
truepsw = input('请输入密码')
if (truepsw == psw):
    print('已确定您是主人')
else :
    print('可不能干坏事哦。')

首先,密码要是一个字符串;

第二,变量名不能是中文;

第三,建议使用固定的密码

2024-07-09T22:44:21 点赞:1

【CoCo V1.21版本更新】叮叮叮~ 云存储控件大升级!快来围观! 中回复

#include <iostream>
using namespace std;
int main()
{
    while(true)
    {
        cout<<"我要催更!"<<endl;
    }
    return 0;
}

2024-07-09T22:58:14 点赞:0

CoCo登录/注册页面制作教程(附作者已完成的代码) 中回复

给你们看看我的

center_image

2024-07-09T23:05:04 点赞:1

CoCo登录/注册页面制作教程(附作者已完成的代码) 中回复

center_image

2024-07-09T23:06:46 点赞:0

C++!!! 中回复

我能

2024-07-10T08:05:26 点赞:0

C++!!! 中回复

#include <iostream>
#include <ctime>
#include <cstdlib>
#include <conio.h>
#include <windows.h>

using namespace std;

const int width = 20;
const int height = 40;
int birdX, birdY;
int pipe1X, pipe1Y, pipe2X, pipe2Y;
int score;

void down()
{
	birdY++;
}

void gotoxy(int x, int y) {
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}

void draw() {
    system("cls");
    for (int i = 0; i < width; i++) {
        for (int j = 0; j < height; j++) {
            if (i == 0 || i == width - 1 || j == 0 || j == height - 1) {
                cout << "#";
            } else if (i == birdX && j == birdY) {
                cout << "@";
            } else if (i == pipe1X || i == pipe2X) {
                if (j >= pipe1Y && j <= pipe1Y + 5) {
                    cout << " ";
                } else if (j >= pipe2Y && j <= pipe2Y + 5) {
                    cout << " ";
                } else {
                    cout << "|";
                }
            } else {
                cout << " ";
            }
        }
        cout << endl;
    }
    cout << "Score: " << score << endl;
}

void update() {
    down();
    pipe1X--;
    pipe2X--;
    if (pipe1X < 0) {
        pipe1X = width - 1;
        pipe1Y = rand() % (height - 6) + 1;
    }
    if (pipe2X < 0) {
        pipe2X = width - 1;
        pipe2Y = rand() % (height - 6) + 1;
    }
    if (birdX == pipe1X || birdX == pipe2X) {
        if (birdY >= pipe1Y && birdY <= pipe1Y + 5) {
            score++;
        } else if (birdY >= pipe2Y && birdY <= pipe2Y + 5) {
            score++;
        } else {
            exit(0);
        }
    }   
}

int main() {
    srand(time(0));
    birdX = width / 2;
    birdY = height / 2;
    pipe1X = width - 1;
    pipe1Y = rand() % (height - 6) + 1;
    pipe2X = width - 1;
    pipe2Y = rand() % (height - 6) + 1;
    score = 0;
     

    while (true) {
        draw();
        if (_kbhit()) {
            char key = _getch();
            if (key == ' ') {
                birdY-=2;
            }
        }
        update();    
        Sleep(100);
    }

	system("cls");
	cout << "Your Score : " << score << endl ;
	system("pause");
	system("pause");
	
    return 0;
}

2024-07-10T08:35:38 点赞:0

求C++学习攻略及软件 中回复

DEV-C++

2024-07-10T09:26:42 点赞:0

【社区功能反馈】用心倾听,用头发发电!(2026更新版) 中回复

center_image

???,怎么反过来了?

2024-07-15T20:59:56 点赞:1

我似乎被扫厕所缠上了 中回复

喵:增 加

2024-07-15T22:55:45 点赞:0

工作室动态发表区 中回复

@VH,我们跟他谈一谈合作:(https://shequ.codemao.cn/work_shop/21846)

2024-07-15T23:12:53 点赞:0

一张图片(微软咋了) 中回复

时间:2024年7月18日19时36分36秒

2024-07-18T19:41:15 点赞:0

工作室动态发表区 中回复

ER0解散了! 原来去这里来了: https://shequ.codemao.cn/work_shop/25398 血狐ER0就在这里

2024-07-24T09:28:28 点赞:0

【社区功能反馈】用心倾听,用头发发电!(2026更新版) 中回复

我这都算包含敏感内容?center_image

2025-05-13T12:27:55 点赞:1