#Overwriting a single element of a 2D Array after having it filled with chars

14 messages · Page 1 of 1 (latest)

clear peak
#

This is supposed to be a field that's filled with dots. I want to add my player to it by changing one of the elements to 'X'.
However, no matter how much I've tried changing, my console keeps spitting out ONLY dots.
I greatly appreciate any help!

vernal lakeBOT
#

This post has been reserved for your question.

Hey @clear peak! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

fallen pawn
#

do you reprint the matrix after changing the char?

#

because on screen you don't call felderMalen() again after setting new value

#

@clear peak

clear peak
# fallen pawn do you reprint the matrix after changing the char?

Absolutely beautiful, I've written a new method that prints out the matrix again but instead filling it with dots again, it only fills that specific element.
Is there maybe a way to only have the field printed out once? Filled with dots, except that one element. Just from the back of your head, since that's what I've been trying and I'm curious. This way works too tho. Thank you so much

vernal lakeBOT
fallen pawn
clear peak
#

Exactly that

#

@fallen pawn

fallen pawn
# clear peak Exactly that

I guess for redrawing the world in same area (without drawing below previous print) you should use ansi codes, that will do the magic.

clear peak
vernal lakeBOT
# clear peak I will look into that, thank you so much!

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.