Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I modify that string?
    text
    copied!<p>Good day,</p> <p>I don't know how to describe my problem (which is more like a challenge) but I'll do my best.</p> <p>I am working on a text-based game and as your character moves, you get informations such as the room name and below, a description (Lorem ipsum in the example) which is an array of string. I would like to know how to append characters to it. I am actually trying to display a minimap made of ASCII character. See the second bloc code for an example.</p> <p>From:</p> <pre><code>Room Name Here Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis tempus orci diam. Curabitur hendrerit augue et lorem vulputate semper. Nullam aliquam eleifend sapien nec bibendum. Donec accumsan leo eu orci elementum semper in mollis metus. Ut ipsum diam, suscipit vel bibendum non, congue eu nisi. Donec justo dolor, scelerisque nec fringilla nec, aliquet sit amet elit. Morbi elementum pharetra odio, nec accumsan velit lacinia quis. [Exits: none] [Doors: none] </code></pre> <p>Into:</p> <pre><code>Room Name Here Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis +-----+ tempus orci diam. Curabitur hendrerit augue et lorem vulputate | # | semper. Nullam aliquam eleifend sapien nec bibendum. Donec |#-#-#| accumsan leo eu orci elementum semper in mollis metus. Ut ipsum | # | diam, suscipit vel bibendum non, congue eu nisi. Donec justo +-----+ dolor, scelerisque nec fringilla nec, aliquet sit amet elit. Morbi elementum pharetra odio, nec accumsan velit lacinia quis. [Exits: none] [Doors: none] </code></pre> <p>The game itself is made in VB.NET but a solution in pseudo-code is also welcomed.</p> <p>Also, each line's length is aproximatively the maximum length it must be.</p> <p>Thank you guys! </p> <p><strong>Edit:</strong> The desired output must be an array of strings because this data is later send to a client connected using sockets.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload