Skip to main content
gamedev.net
🔒 Locked

Basic array help required

Started by Vod Jul 30, 2007 at 8:47 AM 1 replies 1.3k views
Original Post
Vod
Vod
ok so my initial thought was to have to have a multi-dimensional array of chars or ints to represent the rooms in the maze. It would be easy to move between the rooms of the maze and also determine which are of the same set. Now I set to thinking about having an array of walls. This is causing me grief as I cannot figure out how to set this up. For example: a 4 room maze will have 4 walls; a 9 room maze will have 12 walls; a 16 room maze will have 24 walls. Maybe I need to use a pair of nested for loops based on the dimensions (ie rows, columns) of the room array to create this wall array? Am I on the right track here? [edit] Nevermind, I think I'm getting somewhere now... [Edited by - Vod on July 30, 2007 11:24:34 AM]
TheTroll
TheTroll
Have you thought of having a multidimensional array of Room classes?

theTroll
Vod
Vod
Quote:
Original post by TheTroll
Have you thought of having a multidimensional array of Room classes?

theTroll


You can do that?? hmm sounds interesting...I might have to come back to that as a concept when I'm more up to speed (or when I get stuck again -which should be in about 5 hours hehe)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.