only store one snake with the same type and move Calculations into moves as the array<json> type
This commit is contained in:
+3
-13
@@ -34,10 +34,8 @@ module default {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
}
|
||||
single snake: Snake {
|
||||
required single snake: Snake {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
on target delete allow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +66,7 @@ module default {
|
||||
required type: str {
|
||||
readonly := true;
|
||||
}
|
||||
#constraint exclusive on .type;
|
||||
constraint exclusive on ( .type );
|
||||
}
|
||||
|
||||
type Moves {
|
||||
@@ -81,15 +79,7 @@ module default {
|
||||
required game_board: json {
|
||||
readonly := true;
|
||||
}
|
||||
single calculations: Calculations {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
on target delete allow;
|
||||
}
|
||||
}
|
||||
|
||||
type Calculations {
|
||||
required data: array<json> {
|
||||
calculations: array<json> {
|
||||
readonly := true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user