From 9991f10a941673f3f2cd29289407688bc8ae6478 Mon Sep 17 00:00:00 2001 From: qvdz Date: Fri, 16 Jan 2026 06:58:40 +0000 Subject: [PATCH] Update game.json --- game.json | 164 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 85 insertions(+), 79 deletions(-) diff --git a/game.json b/game.json index 8712089..1193b76 100644 --- a/game.json +++ b/game.json @@ -293,53 +293,57 @@ "game_mechanics": { "cách_chơi": "Người chơi kéo nối hoặc chọn cặp tương ứng giữa 2 cột", "cách_tính_điểm": "Mỗi cặp đúng = 1 điểm", - "xác_định_đáp_án": "So sánh cặp left-right người chơi nối với mảng 'pairs'" + "xác_định_đáp_án": "So sánh cặp left-right người chơi nối với mảng 'items'" }, "base_schema": { - "pairs": { - "type": "array", + "left": { + "type": "object", "nullable": false, - "mô_tả": "Danh sách các cặp nối (min 2, max 10)", - "item_schema": { - "left": { - "text": { - "type": "string", - "nullable": true, - "mô_tả": "Nội dung text cột trái" - }, - "image_url": { - "type": "string", - "nullable": true, - "mô_tả": "URL hình ảnh cột trái" - }, - "image_description": { - "type": "string", - "nullable": true, - "mô_tả": "Mô tả hình ảnh" - } + "mô_tả": "Nội dung cột trái", + "fields": { + "text": { + "type": "string", + "nullable": true, + "mô_tả": "Nội dung text" }, - "right": { - "text": { - "type": "string", - "nullable": true, - "mô_tả": "Nội dung text cột phải" - }, - "image_url": { - "type": "string", - "nullable": true, - "mô_tả": "URL hình ảnh cột phải" - }, - "image_description": { - "type": "string", - "nullable": true, - "mô_tả": "Mô tả hình ảnh" - } + "image_url": { + "type": "string", + "nullable": true, + "mô_tả": "URL hình ảnh" } } }, + "right": { + "type": "object", + "nullable": false, + "mô_tả": "Nội dung cột phải (cấu trúc giống left)" + }, + "is_example": { + "type": "boolean", + "nullable": false, + "default": false, + "mô_tả": "true = đây là câu mẫu" + } + }, + "metadata_schema": { + "title": { + "type": "string", + "mô_tả": "Tiêu đề bài" + }, + "description": { + "type": "string", + "mô_tả": "Mô tả" + }, + "grade": { + "type": "number", + "mô_tả": "Khối lớp 1-12" + }, + "difficulty": { + "type": "number", + "mô_tả": "Độ khó 1-5" + }, "mode": { "type": "enum", - "nullable": false, "values": [ "text_to_text", "text_to_image", @@ -350,21 +354,13 @@ }, "left_label": { "type": "string", - "nullable": false, "default": "Column A", "mô_tả": "Tên cột trái" }, "right_label": { "type": "string", - "nullable": false, "default": "Column B", "mô_tả": "Tên cột phải" - }, - "is_example": { - "type": "boolean", - "nullable": false, - "default": false, - "mô_tả": "true = đây là câu mẫu" } }, "variants": [ @@ -372,14 +368,11 @@ "name": "Nối Text - Text", "mô_tả": "Nối 2 cột văn bản (câu hỏi-đáp án, từ-nghĩa)", "required_fields": [ - "pairs", - "mode", - "left_label", - "right_label" + "left", + "right" ], - "note": "Cả left và right đều dùng field 'text'", "example": { - "pairs": [ + "items": [ { "left": { "text": "Thủ đô của Pháp?" @@ -397,64 +390,77 @@ } } ], - "mode": "text_to_text", - "left_label": "Câu hỏi", - "right_label": "Đáp án" + "metadata": { + "mode": "text_to_text", + "left_label": "Câu hỏi", + "right_label": "Đáp án" + } } }, { "name": "Nối Text - Hình ảnh", "mô_tả": "Nối từ với hình ảnh tương ứng", "required_fields": [ - "pairs", - "mode", - "left_label", - "right_label" + "left", + "right" ], - "note": "left dùng 'text', right dùng 'image_url' + 'image_description'", "example": { - "pairs": [ + "items": [ { "left": { "text": "Apple" }, "right": { - "image_url": "https://example.com/apple.jpg", - "image_description": "Quả táo đỏ" + "image_url": "https://example.com/apple.jpg" + } + }, + { + "left": { + "text": "Car" + }, + "right": { + "image_url": "https://example.com/car.jpg" } } ], - "mode": "text_to_image", - "left_label": "Từ vựng", - "right_label": "Hình ảnh" + "metadata": { + "mode": "text_to_image", + "left_label": "Từ vựng", + "right_label": "Hình ảnh" + } } }, { "name": "Nối Hình ảnh - Hình ảnh", "mô_tả": "Nối 2 hình ảnh có liên quan với nhau", "required_fields": [ - "pairs", - "mode", - "left_label", - "right_label" + "left", + "right" ], - "note": "Cả left và right đều dùng 'image_url' + 'image_description'", "example": { - "pairs": [ + "items": [ { "left": { - "image_url": "https://example.com/cat.jpg", - "image_description": "Con mèo" + "image_url": "https://example.com/cat.jpg" }, "right": { - "image_url": "https://example.com/fish.jpg", - "image_description": "Con cá" + "image_url": "https://example.com/fish.jpg" + } + }, + { + "left": { + "image_url": "https://example.com/dog.jpg" + }, + "right": { + "image_url": "https://example.com/bone.jpg" } } ], - "mode": "image_to_image", - "left_label": "Động vật", - "right_label": "Thức ăn yêu thích" + "metadata": { + "mode": "image_to_image", + "left_label": "Động vật", + "right_label": "Thức ăn" + } } } ]