remove calculations from snake and move it into moves
This commit is contained in:
@@ -34,9 +34,10 @@ module default {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
}
|
||||
required single snake: Snake {
|
||||
single snake: Snake {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
on target delete allow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +48,7 @@ module default {
|
||||
required is_ladder: bool {
|
||||
readonly := true;
|
||||
}
|
||||
#constraint exclusive on ( (.name, .is_ladder) );
|
||||
}
|
||||
|
||||
type Ruleset {
|
||||
@@ -59,16 +61,13 @@ module default {
|
||||
required settings: json {
|
||||
readonly := true;
|
||||
}
|
||||
#constraint exclusive on ( (.name, .version, .settings) );
|
||||
}
|
||||
|
||||
type Snake {
|
||||
required type: str {
|
||||
readonly := true;
|
||||
}
|
||||
required multi calculations: Calculations {
|
||||
readonly := true;
|
||||
on source delete delete target;
|
||||
}
|
||||
}
|
||||
|
||||
type Moves {
|
||||
@@ -81,12 +80,14 @@ 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 turn: int32 {
|
||||
readonly := true;
|
||||
}
|
||||
required data: array<json> {
|
||||
readonly := true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user