I'm creating a simple text based fighting game with a friend, and I'm in charge of the random map generator. The idea, is the player can innput map dimensions, and the code generates one boss room, x number of shops and the rest are normal rooms. I have a program that works for 3x3 and 2x2, but if the player inputs 4 (at the moment I'm focusing on only using square maps despite the variables for rectangular maps being there) the program crashes.
My current code is here: http://pastebin.com/fyH8SwH9
Could someone please explain why it crashes with 4 or more? I'm completely stuck!
Help with a random map generator.
Post a Reply
|Oldest Newest Rating|
· January 20, 2015
Thanks! Sorry I posted this to reddit to and luckily they found the solution!
· January 9, 2015
One of the most popular languages of all time.
|Bucky Roberts Administrator|