I am struggling on how to internally represent my roguelike maze. Currently I maintain a 2D array as well as an array of StringBuffers. The array is used for easy lookup of objects in the maze. The StringBuffer is used to quickly generate a string to draw on the screen. The problem is that I need to update both structure every time something moves in the maze.
I could just keep the 2D array. Then I could generate the Strings on the fly as I need to display. However I do a lot of display updates (whenever the player moves). That might take a lot of time to generate an 80x25 worth of character Strings.
Or I could just keep everything in the String array. Then I could index into it when I need to check different cells of the maze. That just does not feel as natural as the separate 2D array though.
To Be A Hacker - I read an article on TurboFuture about the 10 most powerful hacking groups. The usual suspects were there. The site gave a blurb about each of the most fa...
2 days ago