only store one snake with the same type and move Calculations into moves as the array<json> type

This commit is contained in:
2024-05-08 15:38:14 +02:00
parent bb92715de1
commit aba457423e
2 changed files with 5 additions and 19 deletions
+2 -6
View File
@@ -47,11 +47,7 @@ class EdgeDB:
turn := data.turn,
snake_move := data.`move`,
game_board := data.game_board,
calculations := (
insert Calculations {
data := data.calculations
}
)
calculations := data.calculations
}
),
type := (
@@ -70,7 +66,7 @@ class EdgeDB:
snake := (
insert Snake {
type := <str>$snake_type
}
} unless conflict on .type else Snake
)
}""",