Commit Graph

293 Commits

Author SHA1 Message Date
Yohann D'ANELLO 8e7029e34d
Fix walls 2021-01-08 17:10:30 +01:00
Yohann D'ANELLO 1ab63434f6
Merge branch 'master' into map_generation
# Conflicts:
#	squirrelbattle/game.py
#	squirrelbattle/interfaces.py
#	squirrelbattle/tests/game_test.py
2021-01-08 17:02:10 +01:00
Yohann D'ANELLO afaa9d17cd
Linting 2021-01-08 16:55:02 +01:00
Yohann D'ANELLO 9b853324ad
Drop first version of random walk 2021-01-08 16:52:38 +01:00
Charles Peyrat c216a6089e Add a break so that generated rooms arre only placed once 2021-01-08 16:51:04 +01:00
Charles Peyrat a390f4f5e9 Fix is_connex tests 2021-01-08 16:21:16 +01:00
Charles Peyrat 0aa4eb9c0b Refactoring in tests to allow for easy connexity verification 2021-01-08 16:11:17 +01:00
Yohann D'ANELLO 7a4936e6a5
Test monocles 2021-01-08 15:58:54 +01:00
Charles Peyrat 785ac403e3 Forbid walker from ever reaching the outer most edge of the map 2021-01-08 15:56:30 +01:00
Charles Peyrat f240cafa83 Fixing syntax in tests 2021-01-08 15:55:26 +01:00
Yohann D'ANELLO a497d08f31
Implement the monocle of truth, closes #62 2021-01-08 15:48:12 +01:00
Charles Peyrat 5424c7cd98 Nicer default parameters 2021-01-08 15:20:32 +01:00
Charles Peyrat dab84738d9 Remove the starting room door only if it really shouldn't be here; also account for the new randomized placement in removing lone door tile 2021-01-08 15:18:13 +01:00
Yohann D'ANELLO 1270640619
Change hint whenever the T key is pressed or not 2021-01-08 15:07:35 +01:00
Charles Peyrat 8d7e264381 Fix a bug where the generator could crash by trying to place the starting room out of bounds; starting room position is now random 2021-01-08 15:06:38 +01:00
Yohann D'ANELLO 28a6532a21
Add a hint to tell the user how to talk to friendly entities 2021-01-08 14:59:44 +01:00
Charles Peyrat fab1bee8d8 Force loop entrance to get coverage 2021-01-08 14:52:59 +01:00
Yohann D'ANELLO 156e4a7e3a
Add a hint to tell the user how to use ladders 2021-01-08 14:51:56 +01:00
Yohann D'ANELLO f48377e055
Save floors and visibility, fixes #61 2021-01-08 14:23:57 +01:00
Yohann D'ANELLO 120ec82d09
Helmet needs only one character in squirrel mode, add a trailing space 2021-01-08 12:07:13 +01:00
Yohann D'ANELLO 571e9db3e8
Fix french translations 2021-01-08 12:06:28 +01:00
Yohann D'ANELLO e56bdc16c2
Add item description, closes #59 2021-01-08 11:55:25 +01:00
ynerant 2b3a8279b8 Merge branch 'fix-settings' into 'master'
Fix settings

Closes #57 et #58

See merge request ynerant/squirrel-battle!56
2021-01-08 11:30:02 +01:00
Yohann D'ANELLO 75e93611c3
Capture all mouse events and take into account mouse attributes, fixes #58 2021-01-08 11:21:40 +01:00
Yohann D'ANELLO b42f1277b1
Exit the game on KeyboardInterrupt (don't log this error) 2021-01-08 11:10:10 +01:00
eichhornchen 196e3708d2 Merge branch 'master' into 'doc'
# Conflicts:
#   squirrelbattle/entities/items.py
#   squirrelbattle/interfaces.py
2021-01-08 11:10:09 +01:00
Yohann D'ANELLO ac8c7a0a4c
Only read required keys in settings file 2021-01-08 11:07:38 +01:00
eichhornchen 6673b67ffe Repaired spawn of trumpets. 2021-01-08 10:58:40 +01:00
Charles Peyrat c06f903a16 Fix a typo that made corridors unable to be built 2021-01-08 07:41:00 +01:00
Charles Peyrat c6947fab44 Integrate the new map generation into the game ! Closes #5 2021-01-08 07:39:52 +01:00
Charles Peyrat 641f5c7872 Make generation more sparse by asking for extra space around rooms; also add out of bounds option to Map.neighbourhood 2021-01-08 07:38:47 +01:00
Charles Peyrat 605696dddd Revamp door placing algorithm so that it generates cleaner doors; also remove lone starting room door from level 2021-01-08 07:36:31 +01:00
Charles Peyrat 5ba07afc9f Fix typo in parameter names 2021-01-08 07:05:02 +01:00
Charles Peyrat e21d4d230c Add missing termination condition 2021-01-08 07:04:24 +01:00
Charles Peyrat b0ac580677 Fix place_walls, that placed floors instead ... 2021-01-08 07:03:49 +01:00
Charles Peyrat d362bdc949 Fix place_room and add missing argument 2021-01-08 06:58:02 +01:00
Charles Peyrat 9c252a2bbc Correct out of bounds errors and add missing arguments to range call 2021-01-08 06:54:01 +01:00
Charles Peyrat c959a9d865 Update tests because Map.neighbourhood became a static method 2021-01-08 05:42:12 +01:00
Charles Peyrat 8475e5228e Large neighbourhood shouldn't return the central cell 2021-01-08 05:41:16 +01:00
Charles Peyrat 20cbf546f9 Correct formulas for random enumeration of a grid 2021-01-08 05:21:31 +01:00
Charles Peyrat 49e261557c Fix typos 2021-01-08 05:14:46 +01:00
Charles Peyrat abbad0f352 Fix formulas in place_room and room_fits 2021-01-08 05:14:32 +01:00
Charles Peyrat 05ccd0e339 Circular rooms should not try to generate any holes if their radius isn't large enough 2021-01-08 04:51:20 +01:00
Charles Peyrat c6f66d95f2 Fix typos 2021-01-08 04:48:32 +01:00
Charles Peyrat 6fbc757f1e Implement method place_walls 2021-01-08 04:43:10 +01:00
Charles Peyrat ffa7641b21 Made Map.neighbourhood a static method 2021-01-08 04:36:57 +01:00
Charles Peyrat 3229eb8ea7 Implement place_room method 2021-01-08 03:45:26 +01:00
Charles Peyrat 42f0c195aa Add prototype for create_random_room; change return value of attach_doors and create_circular_room so we have info on door direction; minor syntax change 2021-01-08 03:43:20 +01:00
Charles Peyrat ddbd0299a0 Implement method room_fits 2021-01-08 03:38:37 +01:00
Charles Peyrat 5cbf15bef5 Return value of Generator.run should be a Map 2021-01-08 03:37:10 +01:00