I'm trying to create a map for an RPG game and it was originally built for a console application. The code for the map is here: http://pastebin.com/R6jyT3vw
The main method was used to Initialise the map, Add Rooms and then display the Map. I'm trying to create an RPG using windows forms, and I wanted to display this map in a richtextbox. I figure the easiest way to do this would be to output the array to a text file and then set the textbox to read that file.
Is this possible to do? I've tried a few things such as a TextWriter:
MapForm mapForm = new MapForm();
Console.SetOut(new ControlWriter(mapForm.rtbMap));
mapForm.Show();
string locationName = _player.CurrentLocation.Name;
_player.CurrentLocation.DisplayMap(locationName);
But this doesn't exactly format how I want it to. Any ideas?
Thanks!