自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 资源 (1)
  • 收藏
  • 关注

转载 c++编写贪吃蛇2

一款好玩的贪吃蛇

2022-07-11 16:50:50 200

原创 c++编写推箱子

#include <iostream>#include <stdio.h> #include <conio.h>#include<stdlib.h> int map[9][11] = { {0,1,1,1,1,1,1,1,1,1,0}, //0代表空地 {0,1,0,0,0,1,0,0,0,1,0}, //1代表墙 {0,1,0,4,4,4,4,4,0,1,0}, //3代表目的地 {0,1,0,4,0,4,0,4,0

2022-03-05 16:05:13 200

原创 c++编写极快贪吃蛇

#include <windows.h>#include <stdlib.h>#include <conio.h>#include <time.h>#include <cstring>#include <cstdio>#include <iostream>#define N 22using namespace std;int gameover;int x1, y1111; // 随机出米int

2022-01-18 17:00:56 173

原创 C\C++编写贪吃蛇

文章目录一、贪吃蛇是什么?二、编写贪吃蛇三、游戏代码一、贪吃蛇是什么?贪吃蛇是一款经典的休闲游戏。有PC和手机等多平台版本,既简单又耐玩。玩家在游戏通过控制蛇头方向吃道具,从而使得蛇变得越来越长。二、编写贪吃蛇该游戏学要学会编写左右控制键,吃食物身体长度+1,将蛇头和蛇身以及米打印在控制台上,判断游戏的输赢。游戏设置等级,空格键暂停三、游戏代码#include <windows.h>#include <stdlib.h>#include <conio.h&gt

2021-08-25 17:01:01 589

原创 c++编写关机的代码

首先创建一个新建文本文档写上下面的代码slidetoshutdown最后重命名:关机.bat

2021-08-19 16:17:21 443

原创 c++编写矿井逃生

#include <time.h>#include <math.h>#include <stdio.h>#include<graphics.h>// 定义常量#define PI 3.141592653589 // 圆周率#define UNIT_GROUND 0 // 表示地面#define UNIT_WALL 1 // 表示墙#define LIGHT_A PI / 3 // 灯光的角度范围#define L

2021-08-15 15:45:48 335

原创 c++编写推箱子

#include<stdio.h>#include<conio.h>#include<windows.h>int map[9][11] = {{0,1,1,1,1,1,1,1,1,1,0},{0,1,0,0,0,1,0,0,0,1,0},{0,1,0,0,3,0,0,0,0,1,0},{0,1,0,3,0,3,3,3,0,1,1},{0,1,0,0,0,2,0,0,0,0,1},{1,1,0,0,1,1,1,0,3,0,1},{1,0,4,4,0,4,

2021-08-14 12:47:46 405

原创 c++编写九九乘法口诀表

#include <stdio.h>int main(){int i, j, k;for (i = 1; i <= 9; i++){for (j = 1; j <= i; j++){k = i * j;printf("%d * %d = %d “, i, j, k);}printf(”\n");}printf(“断点停在这”);return 0;}

2021-07-13 15:34:47 727 1

原创 c++编写打字游戏

//https://gitee.com/devcpp/cgames anbangli@foxmail.com GNU GPL v3/https://gitee.com/devcpp/cgames anbangli@foxmail.com GNU GPL v3//cgame2-2(type).cpp 字符横向移动的打字游戏#include #include #include #include <windows.h> //非标准库函数 Sleep 所需的

2021-05-09 20:35:48 872

原创 pygame编写贪吃蛇

import pygame, sys, random, timefrom pygame.locals import * # 从pygame模块导入常用的函数和常量#定义颜色变量black_colour = pygame.Color(28, 56, 20)white_colour = pygame.Color(255, 144, 20)red_colour = pygame.Color(255,34 , 20)grey_colour = pygame.Color(150, 150, 150)#

2020-10-05 19:36:19 319 1

原创 python编写九九乘法口诀表

# -*- coding: UTF-8 -*- # Filename : test.py # author by : www.runoob.com # 九九乘法表for i in range(1, 10): for j in range(1, i+1): print('{}x{}={}\t'.format(j, i, i*j), end='') print()

2020-10-03 12:40:02 322 2

原创 python编写猫和老鼠

import turtle as timport randomimport timeimport simpleaudio as sa#记录时间start_time = time.time()used_time = 0#3. 创建背景game = t.Screen()game.setup(700, 700)game.bgpic(‘bg.gif’)t.tracer(3)#4. 创建猫咪cat = t.Turtle()cat.color(‘yellow’)cat.shapesize(

2020-08-21 13:38:14 3207

原创 用Python编写打乒乓小游戏

import turtle as t#2. 创建背景game = t.Screen()game.title("打乒乓小游戏")game.bgcolor("black")game.setup(800,600)game.tracer(0)#3. 创建球拍xm = t.Turtle()xm.ht() #先隐藏xm.up()xm.speed(0)xm.color('yellow')xm.shape('square')xm.shapesize(5, 1)xm.goto(-350, 0

2020-08-19 12:14:01 869

原创 python编写打乒乓球小游戏

import turtle as t**#2. 创建背景**game = t.Screen()game.title("打乒乓")game.bgcolor("black")game.setup(800,600)game.tracer(0)#3. 创建球拍xm = t.Turtle()xm.ht() #先隐藏xm.up()xm.speed(0)xm.color('yellow')xm.shape('square')xm.shapesize(5, 1)xm.goto(-350,

2020-08-19 11:42:02 1599 1

thonny.exe

这是一款Python编程软件,很好用的

2020-08-19

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除