daniel156161
|
80b7c4df89
|
fix typo in LocalStorage file path
|
2024-05-08 23:43:01 +02:00 |
|
daniel156161
|
da0347731c
|
make deletion easyer when linked with other objects and make gameboard url into a function
|
2024-05-08 19:04:58 +02:00 |
|
daniel156161
|
a09c05b6ec
|
only store one object of GameType and Ruleset when they already exists in the database
|
2024-05-08 16:11:44 +02:00 |
|
daniel156161
|
aba457423e
|
only store one snake with the same type and move Calculations into moves as the array<json> type
|
2024-05-08 15:38:14 +02:00 |
|
daniel156161
|
bb92715de1
|
marke spots where to add constraint
|
2024-05-08 14:44:48 +02:00 |
|
daniel156161
|
cf45aa60aa
|
remove calculations from snake and move it into moves
|
2024-05-08 14:40:47 +02:00 |
|
daniel156161
|
a58e9695dd
|
fix single mode local storage
|
2024-05-08 14:39:17 +02:00 |
|
daniel156161
|
b57ae5eab2
|
store all games and set standard when gameboard map is empty
|
2024-05-07 19:00:33 +02:00 |
|
daniel156161
|
817b970623
|
game game_type and ruleset exclusive
|
2024-05-07 18:59:59 +02:00 |
|
daniel156161
|
c9e6947758
|
change only output when snake is in a duel
|
2024-05-06 11:23:13 +02:00 |
|
daniel156161
|
4a1fbf2752
|
fix nameing of type and rename function name
|
2024-05-06 11:17:44 +02:00 |
|
daniel156161
|
5b8bf0da31
|
move storage classes into server folder and fix error in localStorage when winner_snake is none
|
2024-05-06 09:13:43 +02:00 |
|
daniel156161
|
4a8cb40bde
|
make winner snake into list
|
2024-05-06 02:55:14 +02:00 |
|
daniel156161
|
c5342c1f4d
|
add seperator when more winners when useing edgedb
|
2024-05-06 00:50:56 +02:00 |
|
daniel156161
|
ac7c397093
|
add c to build the module edgedb
|
2024-05-05 22:50:02 +02:00 |
|
daniel156161
|
7dd46dd72b
|
add env argument for StorageLoader to load correct module and use it when store game history is enabled
|
2024-05-05 22:12:14 +02:00 |
|
daniel156161
|
10c7f2656c
|
edgedb: move Calculations into own type
|
2024-05-05 22:05:10 +02:00 |
|
daniel156161
|
f00efe607f
|
remove Moves when GameBoard get removed
|
2024-05-05 21:00:29 +02:00 |
|
daniel156161
|
c333706b75
|
add class to store the data in the EdgeDB
|
2024-05-05 20:54:56 +02:00 |
|
daniel156161
|
917bd3f6bd
|
add EdgeDB dataschema and module
|
2024-05-05 20:46:15 +02:00 |
|
daniel156161
|
83bcf4f194
|
make new LocalStorage Class and move save functions into it
|
2024-05-05 17:02:18 +02:00 |
|
daniel156161
|
ef4dca447f
|
fix error where my snake got not found in avoid_get_eaten_by_other_snakes
|
2024-04-18 23:56:49 +02:00 |
|
daniel156161
|
db3a353090
|
change over to new Game Board class from old Game Storage class
|
2024-04-18 23:41:53 +02:00 |
|
daniel156161
|
1f4d17d42f
|
add store functions to game board
|
2024-04-18 23:41:17 +02:00 |
|
daniel156161
|
f98430462b
|
use new game board functions
|
2024-04-18 22:21:57 +02:00 |
|
daniel156161
|
c26824aeaf
|
create a game board class
|
2024-04-18 22:20:07 +02:00 |
|
daniel156161
|
87690177a5
|
make find_safe_positions function be useable for more posisions
|
2024-04-18 19:52:19 +02:00 |
|
daniel156161
|
8a2a62ef57
|
add env variable for the server class debug
|
2024-04-18 17:16:23 +02:00 |
|
daniel156161
|
5796ce0a6e
|
add function to calculate where the new snake body is with or with no tail based on the move that is taken
|
2024-04-18 17:14:49 +02:00 |
|
daniel156161
|
5522a52227
|
set TemplateSnake as default loaded snake
|
2024-04-18 16:59:28 +02:00 |
|
daniel156161
|
5743f5c111
|
print moves only if debug is on and better error handeling if running game into found in dict
|
2024-04-18 08:23:10 +02:00 |
|
daniel156161
|
9950fa1952
|
create env variable that allow to create a .env file if neaded
|
2024-04-17 20:09:57 +02:00 |
|
daniel156161
|
4620ee31eb
|
split class name and print out with spaces
|
2024-04-17 20:09:34 +02:00 |
|
daniel156161
|
9103e3e139
|
store history into data folder
|
2024-04-17 19:57:39 +02:00 |
|
daniel156161
|
04eef9229c
|
not store config file just read if exist or overwrite default_snake_config
|
2024-04-17 19:53:02 +02:00 |
|
daniel156161
|
7cb1fdc57d
|
add sample env config to docker file
|
2024-04-17 19:29:49 +02:00 |
|
daniel156161
|
cceded8468
|
add function to overwrite snake config when its set as env and use smaller python alpine container as base
|
2024-04-17 19:29:18 +02:00 |
|
daniel156161
|
8c57e48f60
|
if got Key Error in move function create a new snake and calculate next best move
|
2024-04-17 15:55:37 +02:00 |
|
daniel156161
|
5ce12d70c1
|
remove pos where other snake head is to not go into a dead end or use the pos where the snake head could be to find new food
|
2024-04-17 15:17:09 +02:00 |
|
daniel156161
|
950351b407
|
add code to not get eaten when head is by food
|
2024-04-17 15:15:25 +02:00 |
|
daniel156161
|
12ac257d19
|
add option to overwrite color with env param
|
2024-04-17 13:43:58 +02:00 |
|
daniel156161
|
d4b54d48b9
|
when both posisions are not save keep them in safe posisions - remove other useless MasterSnake
|
2024-04-17 13:35:42 +02:00 |
|
daniel156161
|
034b0e361a
|
save direction to kill the snake use the correct kill direction in overwrite_eat_the_other_snake can end in a draw when both heads are by the food
|
2024-04-17 12:22:54 +02:00 |
|
daniel156161
|
a57536b7cb
|
remove functions that are in the TemplateSnake now and at to do if eating the food would kill the snake
|
2024-04-17 11:54:24 +02:00 |
|
daniel156161
|
a606ae6f94
|
add template code for a smart random snake
|
2024-04-17 11:53:21 +02:00 |
|
daniel156161
|
b364c6454e
|
optimise game type constrictor to fill up most of the game board
|
2024-04-17 11:15:06 +02:00 |
|
daniel156161
|
b9a0bca4c6
|
remove not used function is_food_nearby
|
2024-04-17 10:54:18 +02:00 |
|
daniel156161
|
ea36d60b4d
|
change code to not have a big choose_move function and add todos to try fix some problems in game
|
2024-04-17 09:33:35 +02:00 |
|
daniel156161
|
0fe4e6ac83
|
fix a error where self.safe_positions[0] can't be accest
|
2024-04-17 08:19:32 +02:00 |
|
daniel156161
|
93b2c8ba99
|
cleanup the code a bit more to use the self params
|
2024-04-16 21:47:40 +02:00 |
|