#include <iostream>
#include <format>
#include <vector>
#include <string>
#include <thread>
#include <chrono>
#include <random>
#include <ranges>
#include <conio.h>
#include <windows.h>
#include <ctime>
#include <cstdlib>
......................
阅读全部
|
wengzixi
贴于 2025年7月29日 13:54
hide
bbsi
import pygame,sys,random
from pygame.locals import *
#定义颜色变量 目标方块的颜色
redColor = pygame.Color(250,0,0)
#贪吃蛇的颜色
whiteColor = pygame.Color(255,255,255)
#背景颜色
blackColor = pygame.Color(0,0,0)
def gameOver():
pygame.quit()
sys.exit()
......................
阅读全部
|
wengzixi
贴于 2025年7月28日 18:50
hide
bbsi
import pygame,sys,random
from pygame.locals import *
#定义颜色变量 目标方块的颜色
redColor = pygame.Color(250,0,0)
#贪吃蛇的颜色
whiteColor = pygame.Color(255,255,255)
#背景颜色
blackColor = pygame.Color(0,0,0)
def gameOver():
pygame.quit()
sys.exit()
......................
阅读全部
|
wengzixi
贴于 2025年7月28日 18:50
hide
bbsi
import pygame
import random
def main():
# 初始化pygame
pygame.init()
# 默认不全屏
fullscreen = False
# 窗口未全屏宽和高
WIDTH, HEIGHT = 1100, 600
......................
阅读全部
|
wengzixi
贴于 2025年7月28日 18:47
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#define M 50
struct date {
int year;
int month;
int day;
};
struct library {
int book_num; // 图书编号
......................
阅读全部
|
q112q
贴于 2025年7月7日 11:14
hide
bbsi
import pygame
import sys
import math
import random
from pygame.locals import *
# 初始化pygame
pygame.init()
# 屏幕设置
SCREEN_WIDTH = 1200
SCREEN_HEIGHT = 700
......................
阅读全部
|
宇智波泉奈
贴于 2025年7月5日 16:51
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// 函数声明
int add(int a, int b);
int is_prime(int num);
void reverse_string(char *str);
int main() {
// 测试整数加法
int sum = add(5, 7);
......................
阅读全部
|
oklanbo
贴于 2025年6月5日 14:26
hide
bbsi
#include <stdio.h>
int main() {
printf("我在编程中国学C语言\n\n");
// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("我爱编程中国 %d 次\n", i);
}
printf("\n\n绘制一个心形图案:");
......................
阅读全部
|
咪咪牛
贴于 2025年5月19日 22:37
hide
bbsi
import random
import pygame
from pygame.locals import *
pygame.init()
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
CELL_SIZE = 20
BACKGROUND_COLOR = (40, 40,40)
SNAKE_COLOR =(255,255,255)
HEAD_COLOR = (0,255,0)
......................
阅读全部
|
gyg406
贴于 2025年5月11日 19:16
hide
bbsi
#include <stdio.h>
int main() {
printf("我在编程中国学C语言\n\n");
// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("我爱编程中国 %d 次\n", i);
}
printf("\n\n绘制一个心形图案:");
......................
阅读全部
|
MIAO0309ZHEN
贴于 2025年5月9日 18:16
hide
bbsi