Update from 30

This commit is contained in:
Administrator 2025-06-16 09:04:18 +00:00
parent cb28bf3980
commit cd5612e4d1
4 changed files with 12 additions and 12 deletions

View file

View file

@ -11,7 +11,7 @@ The `userInput` function takes as input the user `action` and an additional para
The `updateCurrentState` function is intended to get data for rendering in the interface. It returns a structure containing information about the current state of the game. For example, for Tetris, the expiration of the timer causes the piece to move down one row. This function should be called from the interface at some intervals to keep the interface up to date. The `updateCurrentState` function is intended to get data for rendering in the interface. It returns a structure containing information about the current state of the game. For example, for Tetris, the expiration of the timer causes the piece to move down one row. This function should be called from the interface at some intervals to keep the interface up to date.
```c ```c
typedef enum UserAction_t { typedef enum {
Start, Start,
Pause, Pause,
Terminate, Terminate,
@ -20,9 +20,9 @@ typedef enum UserAction_t {
Up, Up,
Down, Down,
Action Action
}; } UserAction_t;
typedef struct GameInfo_t { typedef struct {
int **field; int **field;
int **next; int **next;
int score; int score;
@ -30,7 +30,7 @@ typedef struct GameInfo_t {
int level; int level;
int speed; int speed;
int pause; int pause;
}; } GameInfo_t;
void userInput(UserAction_t action, bool hold); void userInput(UserAction_t action, bool hold);

View file

@ -11,7 +11,7 @@
Функция `updateCurrentState` предназначена для получения данных для отрисовки в интерфейсе. Она возвращает структуру, содержащую информацию о текущем состоянии игры. Например, для тетриса истечение таймера приводит к смещению фигуры вниз на один ряд. Эта функция должна вызываться из интерфейса с некоторой периодичностью для поддержания интерфейса в актуальном состоянии. Функция `updateCurrentState` предназначена для получения данных для отрисовки в интерфейсе. Она возвращает структуру, содержащую информацию о текущем состоянии игры. Например, для тетриса истечение таймера приводит к смещению фигуры вниз на один ряд. Эта функция должна вызываться из интерфейса с некоторой периодичностью для поддержания интерфейса в актуальном состоянии.
```c ```c
typedef enum UserAction_t { typedef enum {
Start, Start,
Pause, Pause,
Terminate, Terminate,
@ -20,9 +20,9 @@ typedef enum UserAction_t {
Up, Up,
Down, Down,
Action Action
}; } UserAction_t;
typedef struct GameInfo_t { typedef struct {
int **field; int **field;
int **next; int **next;
int score; int score;
@ -30,7 +30,7 @@ typedef struct GameInfo_t {
int level; int level;
int speed; int speed;
int pause; int pause;
}; } GameInfo_t;
void userInput(UserAction_t action, bool hold); void userInput(UserAction_t action, bool hold);

View file

@ -11,7 +11,7 @@ Har bir oyin kutubxonasida foydalanuvchi malumotlarini qabul qiladigan fun
`updateCurrentState` funksiyasi interfeysda korsatish uchun malumotlarni olish uchun moljallangan. U oyinning joriy holati haqida malumotni oz ichiga olgan tuzilmani qaytaradi. Masalan, tetris uchun taymerning tugashi shaklning bir qator pastga siljishiga olib keladi. Interfeysni yangilab turish uchun ushbu funktsiyani interfeysdan malum vaqt oraligida chaqirish kerak. `updateCurrentState` funksiyasi interfeysda korsatish uchun malumotlarni olish uchun moljallangan. U oyinning joriy holati haqida malumotni oz ichiga olgan tuzilmani qaytaradi. Masalan, tetris uchun taymerning tugashi shaklning bir qator pastga siljishiga olib keladi. Interfeysni yangilab turish uchun ushbu funktsiyani interfeysdan malum vaqt oraligida chaqirish kerak.
```c ```c
typedef enum UserAction_t { typedef enum {
Start, Start,
Pause, Pause,
Terminate, Terminate,
@ -20,9 +20,9 @@ typedef enum UserAction_t {
Up, Up,
Down, Down,
Action Action
}; } UserAction_t;
typedef struct GameInfo_t { typedef struct {
int **field; int **field;
int **next; int **next;
int score; int score;
@ -30,7 +30,7 @@ typedef struct GameInfo_t {
int level; int level;
int speed; int speed;
int pause; int pause;
}; } GameInfo_t;
void userInput(UserAction_t action, bool hold); void userInput(UserAction_t action, bool hold);