Renew Projects

This commit is contained in:
e2hang
2025-12-31 13:22:56 +08:00
parent 4b60ced553
commit d143bbc65c
1753 changed files with 841 additions and 0 deletions

21
Huajisheblockade/Apple.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef APPLE_H_
#define APPLE_H_
#include <SDL3/SDL.h>
#include <random>
#include <ctime>
class Apple {
public:
Apple(int screenWidth, int screenHeight, int segmentSize);
void Spawn();
void Render(SDL_Renderer* renderer);
SDL_Point GetPos() const { return pos; }
private:
SDL_Point pos;
int segmentSize;
int screenW, screenH;
};
#endif