#include <stdio.h>
#include <gtk/gtk.h>
#include <math.h>
#include <stdlib.h>
// 游戏区域的定义
#define GAME_WIDTH 500
#define GAME_LENGTH 600
struct ball
{
int x, y; // 小球的坐标(圆心)
int speed_x, speed_y; // 小球的速度
int radius; // 半径
int exist; // 是否存在
};
struct Baffle
{
int x, y; // 挡板的坐标(挡板左上角)
int width, length; // 挡板的长和宽
};
struct Bricks
{
int matrix[8][12]; ......
阅读全文