Update from 30
This commit is contained in:
parent
cb28bf3980
commit
cd5612e4d1
4 changed files with 12 additions and 12 deletions
|
|
@ -11,7 +11,7 @@ Har bir o’yin kutubxonasida foydalanuvchi ma’lumotlarini qabul qiladigan fun
|
|||
`updateCurrentState` funksiyasi interfeysda ko’rsatish uchun ma’lumotlarni olish uchun mo’ljallangan. U o’yinning joriy holati haqida ma’lumotni o’z ichiga olgan tuzilmani qaytaradi. Masalan, tetris uchun taymerning tugashi shaklning bir qator pastga siljishiga olib keladi. Interfeysni yangilab turish uchun ushbu funktsiyani interfeysdan ma’lum vaqt oralig’ida chaqirish kerak.
|
||||
|
||||
```c
|
||||
typedef enum UserAction_t {
|
||||
typedef enum {
|
||||
Start,
|
||||
Pause,
|
||||
Terminate,
|
||||
|
|
@ -20,9 +20,9 @@ typedef enum UserAction_t {
|
|||
Up,
|
||||
Down,
|
||||
Action
|
||||
};
|
||||
} UserAction_t;
|
||||
|
||||
typedef struct GameInfo_t {
|
||||
typedef struct {
|
||||
int **field;
|
||||
int **next;
|
||||
int score;
|
||||
|
|
@ -30,7 +30,7 @@ typedef struct GameInfo_t {
|
|||
int level;
|
||||
int speed;
|
||||
int pause;
|
||||
};
|
||||
} GameInfo_t;
|
||||
|
||||
void userInput(UserAction_t action, bool hold);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue