When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
40 messages ยท Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
THIS IS THE CODE
i tried to comment it as good as i could but
im not really good
What is the use case?
Are you trying to generate a map of some kind
Like a procedurally generated world?
i kinda want to work into that
but im not really good
and i just started the language
its just like basics
The first problem here is that youre doing everything in main
The second problem is that youre way out of scope
Procedural generation is pretty difficult
And no way you can make your own algorithm right now
You could learn from the way games do it right now
Look into white noise and stuff, thats a keyword for a way games procedurally generate maps
Even more relevant to your case is how roguelikes generate their maps
read through learncpp.com
And you will find yourself the answer for this question ๐
Wow you didnt even get into classes ๐
Is this your first language ever?
learncpp.com imo isn't very well geared for people just learning to program because they teach the ins and outs of C++ instead of good programming habits
i didnt really get into classes cause its like in chapter 13
Is this your first language ever?
and i didnt want to disrupt like the course
no
What language did you know before C++
In python, do you remember what def does and stuff
Do you agree its a better idea to "outsource" tasks and stuff to functions?
yes yes
i know
how to do it
but first i wanted to know if i could figure out the logic for this
and i kinda wouldnt know what to put in function except the last lines of code starting from the char map[10][10] line, and i could put those lines in drawMap function i guess with some parameters
but im not really bright and clever as other people