You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a function that generates a random map as a matrix.
The function should take the matrix dimensions as arguments and output an matrix (Array of Arrays).
Every cell in the matrix should be random generated. But the following rules apply
empty spaces should have at least one other empty space adjacent
There should only be one player
There should be one of each character and for each character one planet
Every empty/character/planet space should have at least one wall adjacent
You should decide randomly the cell content between possible values: empty, alien, alien2, ghost, dino, wall, alien_p, alien2_p, ghost_p, dino_p (if ends with _p means planet).
Add tests
The text was updated successfully, but these errors were encountered:
Create a function that generates a random map as a matrix.
The function should take the matrix dimensions as arguments and output an matrix (Array of Arrays).
Every cell in the matrix should be random generated. But the following rules apply
Add tests
The text was updated successfully, but these errors were encountered: