石头剪刀布
#include <stdio.h>#include <stdint.h>#include <time.h>#include <stdlib.h> #define u32 uint32_t#define ROCK 1#define PAPER 2#define SCISSORS 3 void destemine_winner(u32 player_move, u32 computer_move){ //首先排除平局的情况 if (player_move == computer_move) { puts("平局!"); return; } //定义一个胜利的规则映射,其中键是玩家的移动,值是玩家移动可以打败计算机的移动 u32 winning_moves[4] = { 0, SCISSORS, ROCK, PAPER }; //0是占位符 //winning_moves[1] SCISSORS //ROCK == 1 //PAPER ==...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post$ hexo new "My New Post" More info: Writing Run server$ hexo server More info: Server Generate static files$ hexo generate More info: Generating Deploy to remote sites$ hexo deploy More info: Deployment