
Lv.1
本人已死,有事烧纸
签名: 。้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็
在 【神岛圣诞创作节】瓢虫带给我的灵感!! 中回复
作品主页:https://box3.codemao.cn/v/50035712
作者主页:https://box3.codemao.cn/u/code9429979

2022-12-10T19:13:25 点赞:1
在 c++教程1【a+b】 中回复
这个教程不是给初学者的,
而是给有一定基础却不会注释代码的人的
初学者建议去看语法,然后搞逻辑
我的教程会在逻辑上出难题
2022-12-15T19:34:23 点赞:1
在 【Python作品分享】猜数游戏 中回复
代码大师为您转化为c++
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void Start();
void GetResults();
int i, j, life, maxrand;
char c;
void Start() {
i = 0;
j = 0;
life = 0;
maxrand = 6;
cout << "Select difficulty mode:\n"; // the user has to select a difficutly level
cout << "1 : Easy (0-15)\n";
cout << "2 : Medium (0-30)\n";
cout << "3 : Difficult (0-50)\n";
cout << "or type another key to quit\n";
c = 30;
cin >> c; // read the user's choice
cout << "\n";
switch (c) {
case '1':
maxrand = 15; // the random number will be between 0 and maxrand
break;
case '2':
maxrand = 30;
break;
case '3':
maxrand = 50;
break;
default:
exit(0);
break;
}
life = 5; // number of lifes of the player
srand((unsigned)time(NULL)); // init Rand() function
j = rand() % maxrand; // j get a random value between 0 and maxrand
GetResults();
}
void GetResults() {
if (life <= 0) { // if player has no more life then he loses
cout << "You lose !\n\n";
Start();
}
cout << "Type a number: \n";
cin >> i;
if((i>maxrand) || (i<0)) { // if the user number isn't correct, restart
cout << "Error: number not between 0 and \n" << maxrand;
GetResults();
}
if(i == j) {
cout << "YOU WIN!\n\n"; // the user found the secret number
Start();
} else if(i>j) {
cout << "Too BIG\n";
life = life - 1;
cout << "Lives remaining: " << life << "\n\n";
GetResults();
} else if(i<j) {
cout << "Too SMALL\n";
life = life - 1;
cout << "Lives remaining: " << life << "\n\n";
GetResults();
}
}
int main() {
cout << "** Jackpot game **\n";
cout << "The goal of this game is to guess a number.\n";
cout << "Jackpot will tell you if the number is too big or too\n";
cout << "喵all compared to the secret number to find.\n\n";
Start();
return 0;
}2022-12-16T18:30:04 点赞:2
在 想知道我是怎么打出这个字的吗?(点进去看看 中回复
。้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็挖坟
2022-12-18T13:29:00 点赞:2
在 【灌水】为了让你变 sha ,我除了几道题给你做() 中回复
1.:: ?
2.:: ping guo de ying wen
3.:: 哪个
4.:: 怎么
(答案就在文中?)(bushi
2022-12-20T18:58:18 点赞:1
在 找建筑师,策划师,修bug代码师 中回复
我知道好多人都回去看一下,然后想着如果是好图的话hash复制
恶意复制hash的举报官方
我们会检测你的进入创作后的f12举动
2022-12-22T08:18:27 点赞:1
在 神奇代码岛(代码教程)新手必看的代码(1) 中回复
az,
1.不是你抄的??那就是你合作者抄的
world.onVoxelContact(async ({ x, y, z, voxel }) => {
const voxelName = voxels.name(voxel); // 将方块id转换名称
if (voxelName === 'stone') { // 如果方块名称是冰块
voxels.setVoxel(x, y, z, 0); // 将方块变成空气
await sleep(10000)
voxels.setVoxel(x, y, z, 'stone');
} })
为什么你把stone翻译成“如果方块是冰块”??
API里扣得
2.
world.onVoxelContact(({entity,voxel}) => {
if(voxel==voxels.id('grass')){
entity.player.forceRespawn()
entity.player.directMessage("草地不可以触碰!")
}})
最好是y+=5
2022-12-23T14:48:49 点赞:1