Enhance school simulation and management by integrating roster functionality, allowing for the installation and persistence of student and staff data. Update the school architecture to include a roster alongside existing components, ensuring proper validation against map layouts. Revise room definitions to support homeroom designations and update related tests to validate new functionalities and ensure robustness in roster handling.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
],
|
||||
"positions": ["Teacher"],
|
||||
"works": ["TeachLesson"],
|
||||
"homeroom": true,
|
||||
},
|
||||
{
|
||||
"defName": "Library",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
// A small two-storey school: main building on the yard, gym across the yard.
|
||||
// Walkable graph is yard + rooms; floors are grouping only. Stairs link the two corridors.
|
||||
// Two-storey school plus a gym. Eleven homerooms, labelled as room numbers — class names
|
||||
// live on the roster and change every 1 September.
|
||||
"territory": { "id": "yard", "def": "SchoolYard" },
|
||||
"buildings": [
|
||||
{ "id": "main", "def": "MainBuilding" },
|
||||
@@ -47,11 +47,11 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-1a",
|
||||
"id": "classroom-101",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "1A",
|
||||
"label": "101",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
@@ -60,11 +60,37 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-1b",
|
||||
"id": "classroom-102",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "1B",
|
||||
"label": "102",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-103",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "103",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-104",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "104",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
@@ -96,11 +122,11 @@
|
||||
{ "id": "corridor-2", "def": "Corridor", "building": "main", "floor": "floor-2", "label": "2" },
|
||||
{ "id": "stairs-2", "def": "Stairwell", "building": "main", "floor": "floor-2", "label": "2" },
|
||||
{
|
||||
"id": "classroom-2a",
|
||||
"id": "classroom-201",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "2A",
|
||||
"label": "201",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
@@ -109,11 +135,76 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-2b",
|
||||
"id": "classroom-202",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "2B",
|
||||
"label": "202",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-203",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "203",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-204",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "204",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-205",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "205",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-206",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "206",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "teacherChair", "thing": "Chair" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-207",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "207",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
@@ -169,15 +260,22 @@
|
||||
{ "a": "corridor-1", "b": "principals-office" },
|
||||
{ "a": "corridor-1", "b": "secretary-office" },
|
||||
{ "a": "corridor-1", "b": "teachers-room" },
|
||||
{ "a": "corridor-1", "b": "classroom-1a" },
|
||||
{ "a": "corridor-1", "b": "classroom-1b" },
|
||||
{ "a": "corridor-1", "b": "classroom-101" },
|
||||
{ "a": "corridor-1", "b": "classroom-102" },
|
||||
{ "a": "corridor-1", "b": "classroom-103" },
|
||||
{ "a": "corridor-1", "b": "classroom-104" },
|
||||
{ "a": "corridor-1", "b": "cafeteria" },
|
||||
{ "a": "corridor-1", "b": "restroom-1" },
|
||||
{ "a": "corridor-1", "b": "medical-office" },
|
||||
{ "a": "stairs-1", "b": "stairs-2" },
|
||||
{ "a": "stairs-2", "b": "corridor-2" },
|
||||
{ "a": "corridor-2", "b": "classroom-2a" },
|
||||
{ "a": "corridor-2", "b": "classroom-2b" },
|
||||
{ "a": "corridor-2", "b": "classroom-201" },
|
||||
{ "a": "corridor-2", "b": "classroom-202" },
|
||||
{ "a": "corridor-2", "b": "classroom-203" },
|
||||
{ "a": "corridor-2", "b": "classroom-204" },
|
||||
{ "a": "corridor-2", "b": "classroom-205" },
|
||||
{ "a": "corridor-2", "b": "classroom-206" },
|
||||
{ "a": "corridor-2", "b": "classroom-207" },
|
||||
{ "a": "corridor-2", "b": "library" },
|
||||
{ "a": "corridor-2", "b": "computer-lab" },
|
||||
{ "a": "corridor-2", "b": "restroom-2" },
|
||||
|
||||
Reference in New Issue
Block a user