MapGenerator #34
No reviewers
Labels
No Label
Important
Moins important
Pas important
bug
done
duplicate
enhancement
help wanted
invalid
question
suppléments
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
Depends on
#32 addition of vectors
undefined_name/School_Project
#33 Adding Array Copy for matrix
undefined_name/School_Project
Reference: undefined_name/School_Project#34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "MapGenerator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This generate maps following a simple structure
First we choose map size depending on the difficulty
we grind the edge with a random pattern so the map is not just a square
we pick a random open piece and try to make a piece out of it between a size of 1 to 3
and we do this in a loop until all open spaces are filled
this is not the best but it's efficient
known problem:
I think this is technically not a problem in the end. but this could be changed
Before reviewing this pr please watch the other two I made before, it'll be easier to review then.
#33 and #32
@ -0,0 +36,4 @@
}
for (int i = 0; i < map_shape.length; i++) {
for (int j = 0; j < map_shape[0].length; j++) {
if(i > depth - 1 && i < map_shape.length - depth && j > depth - 1 && j < map_shape[0].length - depth){
boucle qui fait le tour des extrémités de la matrice