From 2fbda2566c05842231bd4e1f1a38b07a226b12e5 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 9 Apr 2025 14:36:44 +0000 Subject: [PATCH] Update from 21 --- ACTIVE_TAG_FILES.txt | 0 README.md | 18 ++++++------ README_RUS.md | 8 +++--- README_UZB.md | 4 +-- materials/library-specification.md | 38 +++++++++++++------------- materials/library-specification_RUS.md | 38 +++++++++++++------------- materials/library-specification_UZB.md | 38 +++++++++++++------------- 7 files changed, 72 insertions(+), 72 deletions(-) delete mode 100644 ACTIVE_TAG_FILES.txt diff --git a/ACTIVE_TAG_FILES.txt b/ACTIVE_TAG_FILES.txt deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index b7e92e7..7fd9cd9 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,18 @@ Summary: In this project, you need to implement the Tetris game in the C program # Contents -- [BrickGameTetris](#brickgame-tetris) - - [Contents](#contents) +- [BrickGame Tetris](#brickgame-tetris) +- [Contents](#contents) - [Introduction](#introduction) -- [Chapter I](#chapter-i) - - [General Information](#general-information) + - [Chapter I ](#chapter-i-) +- [General information](#general-information) - [BrickGame](#brickgame) - [History](#history) - - [Finite-state machines](#fine-states-machines) + - [Finite-state machines](#finite-state-machines) - [Frogger](#frogger) - [Tetris](#tetris) -- [Chapter II](#chapter-ii) - - [Project Requirments](#project-requirements) + - [Chapter II ](#chapter-ii-) + - [Project Requirements](#project-requirements) - [Part 1. Main task](#part-1-main-task) - [Part 2. Bonus. Scoring and game record](#part-2-bonus-scoring-and-game-record) - [Part 3. Bonus. Level mechanics](#part-3-bonus-level-mechanics) @@ -110,7 +110,7 @@ You need to implement the BrickGame v1.0 aka Tetris program: - The program interface code must be in the `src/gui/cli` folder. - The program must be built using a Makefile with the standard set of targets for GNU programs: all, install, uninstall, clean, dvi, dist, test, gcov_report. The installation directory can be arbitrary. - The program must be developed according to the principles of structured programming. -- Follow Google Style when writing code. +- Follow Google Style for C++ when writing code ([link](https://google.github.io/styleguide/cppguide.html)). - Prepare full coverage of the library with unit tests, using the `check` library (tests must run on Darwin/Ubuntu OS). The coverage of the library with game logic with tests must be at least 80 percent. - The following mechanics must be present in the game: - Rotation of pieces; @@ -131,7 +131,7 @@ You need to implement the BrickGame v1.0 aka Tetris program: - Action (piece rotation). - The playing area must be the same size as the console's playing field — ten "pixels" wide and twenty "pixels" high. - When the figure reaches the lower boundary of the board or touches another figure, it must stop. After that, the next piece, shown in the preview, is generated. -- The library interface must match the description in materials/library-specification.md. +- The library interface must match the [description](./materials/library-specification.md). - The UI must support rendering of the playing field and additional information. - Prepare a diagram in any format describing the FSM used (its states and all possible transitions). diff --git a/README_RUS.md b/README_RUS.md index 66cc823..450a2c8 100644 --- a/README_RUS.md +++ b/README_RUS.md @@ -8,14 +8,14 @@ - [BrickGame Тетрис](#brickgame-тетрис) - [Содержание](#содержание) - [Введение](#введение) -- [Chapter I](#chapter-i) + - [Chapter I ](#chapter-i-) - [Общая информация](#общая-информация) - [BrickGame](#brickgame) - [История тетриса](#история-тетриса) - [Конечные автоматы](#конечные-автоматы) - [Фроггер](#фроггер) - [Тетрис](#тетрис) -- [Chapter II](#chapter-ii) + - [Chapter II ](#chapter-ii-) - [Требования к проекту](#требования-к-проекту) - [Часть 1. Основное задание](#часть-1-основное-задание) - [Часть 2. Дополнительно. Подсчет очков и рекорд в игре](#часть-2-дополнительно-подсчет-очков-и-рекорд-в-игре) @@ -110,7 +110,7 @@ BrickGame — популярная портативная консоль 90-ых - Код с интерфейсом программы должен находиться в папке `src/gui/cli`. - Сборка программы должна быть настроена с помощью Makefile со стандартным набором целей для GNU-программ: all, install, uninstall, clean, dvi, dist, test, gcov_report. Установка должна вестись в любой другой произвольный каталог. - Программа должна быть разработана в соответствии с принципами структурного программирования. -- При написании кода придерживайся Google Style. +- При написании кода необходимо придерживаться Google Style, заимствованному из стандарта для языка C++ ([ссылка](https://google.github.io/styleguide/cppguide.html)). - Должно быть обеспечено покрытие библиотеки unit-тестами с помощью библиотеки `check` (тесты должны проходить на ОС Darwin/Ubuntu). Покрытие библиотеки с логикой игры тестами должно составлять не меньше 80 процентов. - В игре должны присутствовать следующие механики: - Вращение фигур; @@ -131,7 +131,7 @@ BrickGame — популярная портативная консоль 90-ых - Действие (вращение фигуры). - Игровое поле должно соответствовать размерам игрового поля консоли: десять «пикселей» в ширину и двадцать «пикселей» в высоту. - Фигура после достижения нижней границы поля или соприкосновения с другой фигурой должна остановиться. Вслед за этим происходит генерация следующей фигуры, показанной на превью. -- Интерфейс библиотеки должен соответствовать описанию, которое находится в materials/library-specification_RUS.md. +- Интерфейс библиотеки должен соответствовать описанию, которое находится в [тут](./materials/library-specification_RUS.md). - Пользовательский интерфейс должен поддерживать отрисовку игрового поля и дополнительной информации. - Подготовь в любом формате диаграмму, описывающую используемый КА (его состояния и все возможные переходы). diff --git a/README_UZB.md b/README_UZB.md index 444b1c9..674ba54 100644 --- a/README_UZB.md +++ b/README_UZB.md @@ -110,7 +110,7 @@ Siz BrickGame v1.0 aka Tetris dasturini amalga oshirishingiz kerak: - Dastur interfeysi kodi `src/gui/cli` papkasida joylashgan bo'lishi kerak - Dastur tuzilmasi GNU dasturlari uchun standart maqsadlar to'plamiga ega Makefile yordamida sozlanishi kerak: all, install, uninstall, clean, dvi, dist, test, gcov_report. O'rnatish boshqa har qanday ixtiyoriy katalogda amalga oshirilishi kerak. - Dastur tuzilgan dasturlash tamoyillari asosida ishlab chiqilishi kerak. -- Kod yozishda Google Stylega amal qiling. +- Kod yozishda C++ uchun Google Style ((havola)[(https://google.github.io/styleguide/cppguide.html)]) ga amal qiling. - Kutubxona, `check` kutubxonasidan foydalangan holda unit testlar bilan qoplangan bo'lishi kerak (testlar ОС Darwin/Ubuntu ga o'tkazilishi kerak). Kutubxonaning testlar tomonidan o'yin mantig'i bilan qamrab olinishi kamida 80 foiz bo'lishi kerak. - O'yinda quyidagi mexanika mavjud bo'lishi kerak: - Shakllarni aylantirish; @@ -131,7 +131,7 @@ Siz BrickGame v1.0 aka Tetris dasturini amalga oshirishingiz kerak: - Harakat (shaklning aylanishi). - O'yin maydoni konsol o'yin maydonining o'lchamlariga mos kelishi kerak: kengligi o'n "piksel" va balandligi yigirma "piksel". - Shakl maydonning pastki chegarasiga yetib borganidan keyin yoki boshqa shaklga tekkanidan keyin to‘xtashi kerak. Shundan so'ng, prevyuda ko'rsatilgan keyingi shakl hosil bo'lishi lozim. -- Kutubxona interfeysi materials/library-specification_RUS.md da joylashgan tavsifga mos kelishi kerak. +- Kutubxona interfeysi [bu yerda](./materials/library-specification_UZB.md) joylashgan tavsifga mos kelishi kerak. - Foydalanuvchi interfeysi o'yin maydonini va qo'shimcha ma'lumotlarni ko'rsatishni qo'llab-quvvatlashi kerak. - Foydalanilayotgan SAni (uning holatlari va barcha mumkin bo'lgan o'tishlarini) tavsiflovchi har qanday formatdagi diagramma tayyorlang. diff --git a/materials/library-specification.md b/materials/library-specification.md index 6e4853e..e4dc74b 100644 --- a/materials/library-specification.md +++ b/materials/library-specification.md @@ -11,26 +11,26 @@ 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. ```c -typedef enum { - Start, - Pause, - Terminate, - Left, - Right, - Up, - Down, - Action -} UserAction_t; +typedef enum UserAction_t { + Start, + Pause, + Terminate, + Left, + Right, + Up, + Down, + Action +}; -typedef struct { - int **field; - int **next; - int score; - int high_score; - int level; - int speed; - int pause; -} GameInfo_t; +typedef struct GameInfo_t { + int **field; + int **next; + int score; + int high_score; + int level; + int speed; + int pause; +}; void userInput(UserAction_t action, bool hold); diff --git a/materials/library-specification_RUS.md b/materials/library-specification_RUS.md index e51cd6d..17b9584 100644 --- a/materials/library-specification_RUS.md +++ b/materials/library-specification_RUS.md @@ -11,26 +11,26 @@ Функция `updateCurrentState` предназначена для получения данных для отрисовки в интерфейсе. Она возвращает структуру, содержащую информацию о текущем состоянии игры. Например, для тетриса истечение таймера приводит к смещению фигуры вниз на один ряд. Эта функция должна вызываться из интерфейса с некоторой периодичностью для поддержания интерфейса в актуальном состоянии. ```c -typedef enum { - Start, - Pause, - Terminate, - Left, - Right, - Up, - Down, - Action -} UserAction_t; +typedef enum UserAction_t { + Start, + Pause, + Terminate, + Left, + Right, + Up, + Down, + Action +}; -typedef struct { - int **field; - int **next; - int score; - int high_score; - int level; - int speed; - int pause; -} GameInfo_t; +typedef struct GameInfo_t { + int **field; + int **next; + int score; + int high_score; + int level; + int speed; + int pause; +}; void userInput(UserAction_t action, bool hold); diff --git a/materials/library-specification_UZB.md b/materials/library-specification_UZB.md index 2b5f4b3..46d3614 100644 --- a/materials/library-specification_UZB.md +++ b/materials/library-specification_UZB.md @@ -11,26 +11,26 @@ 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 { - Start, - Pause, - Terminate, - Left, - Right, - Up, - Down, - Action -} UserAction_t; +typedef enum UserAction_t { + Start, + Pause, + Terminate, + Left, + Right, + Up, + Down, + Action +}; -typedef struct { - int **field; - int **next; - int score; - int high_score; - int level; - int speed; - int pause; -} GameInfo_t; +typedef struct GameInfo_t { + int **field; + int **next; + int score; + int high_score; + int level; + int speed; + int pause; +}; void userInput(UserAction_t action, bool hold);