
Lv.1
RendexORE,一个可怜的Minecraft-Java腐竹
签名:我的Sinox OS PT
在 kitten4.0可以用什么游览器 中回复
我在这里列出4个常用浏览器的检测:
Opera

Firefox

Microsoft Edge

Google Chrome

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
在 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
在 工作室动态发表区 中回复
ER0解散了! 原来去这里来了: https://shequ.codemao.cn/work_shop/25398 血狐ER0就在这里
2024-07-24T09:28:28 点赞:0