daniel156161
|
f98430462b
|
use new game board functions
|
2024-04-18 22:21:57 +02:00 |
|
daniel156161
|
87690177a5
|
make find_safe_positions function be useable for more posisions
|
2024-04-18 19:52:19 +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
|
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
|
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 |
|
daniel156161
|
f6db5cb96a
|
fix error in eat_the_snake_overwrite when more moves are posible
|
2024-04-16 00:52:18 +02:00 |
|
daniel156161
|
0eecbb774b
|
store game turn in history file and add safe_positions output to ensure_escape_route calculation
|
2024-04-15 23:56:03 +02:00 |
|
daniel156161
|
9e0a919233
|
fix not used code for flood_fill_count
|
2024-04-15 23:44:47 +02:00 |
|
daniel156161
|
6d9df32076
|
add more debug outputs and use all the self.args when neaded in a specific function, make own variable to only store other snakes
|
2024-04-15 23:16:15 +02:00 |
|
daniel156161
|
863ca1b277
|
fix calculations and not run in snake tail when in constrictor game mode
|
2024-04-15 22:20:15 +02:00 |
|
daniel156161
|
16cab3a9ca
|
change code to store safe_positions in class and remove self.directions
|
2024-04-15 21:56:53 +02:00 |
|
daniel156161
|
281b52e71d
|
remove moving tail of snake when begin moves are done and not calculate own body in avoid_snakes because already avoid own body
|
2024-04-15 14:51:28 +02:00 |
|
daniel156161
|
39b16a1702
|
add function to avoid get eaten by head to head collisons when my snake is smaller else eat the other snake
|
2024-04-15 02:13:11 +02:00 |
|
daniel156161
|
c854b5fec9
|
remove prints and add a note that i neat to fix later
|
2024-04-14 23:33:11 +02:00 |
|
daniel156161
|
2f8e35aced
|
create a better Master Snake that try to not hit itself
|
2024-04-14 21:32:43 +02:00 |
|
daniel156161
|
f444f25a53
|
create snake builder to select snake from a .env file
|
2024-04-13 00:56:56 +02:00 |
|
daniel156161
|
b00de3fc56
|
add mode to only get to food if its nearby
|
2024-04-12 23:10:39 +02:00 |
|
daniel156161
|
5e63d0b35e
|
make more turn often in circles up to 300 turns
|
2024-04-12 18:28:42 +02:00 |
|
daniel156161
|
f0132c5b21
|
add history to MasterSnake
|
2024-04-12 16:01:21 +02:00 |
|
daniel156161
|
5633c4c134
|
add new Snake
|
2024-04-12 15:43:29 +02:00 |
|
daniel156161
|
cbe8890b59
|
add a good snake
|
2024-04-12 14:23:45 +02:00 |
|
daniel156161
|
3c7946382c
|
more error correction and stop to hit self
|
2024-04-12 12:27:11 +02:00 |
|
daniel156161
|
2c7cf98309
|
add new snake with astar and flood_fill
|
2024-04-01 05:20:45 +02:00 |
|
daniel156161
|
b1c0c14444
|
add history to existing snakes
|
2024-04-01 05:16:45 +02:00 |
|
daniel156161
|
dde746900c
|
add template snake for history
|
2024-04-01 05:16:20 +02:00 |
|
daniel156161
|
7a0d8b8b1b
|
fix dumm snake
|
2024-04-01 04:02:20 +02:00 |
|
daniel156161
|
4bde399ae5
|
add DummSnake and test in config
|
2024-04-01 03:59:48 +02:00 |
|
daniel156161
|
d06c05b7b3
|
move Server Logic to own Snake Class
|
2024-04-01 03:51:57 +02:00 |
|