U
U
Undefined User2021-09-17 17:04:12
C++ / C#
Undefined User, 2021-09-17 17:04:12

How to draw with symbols in terminal?

Task: draw a trapezoid in the center of the console window, filled with the entered characters
Please tell me which ones to use, because I couldn’t find it myself. Operating system: macos

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Q
Quark, 2021-09-17
@Quark_Hell

Here is my project, look at the ConsoleInfo and Draw classes there.
https://github.com/Quark-Hell/ChallengeGame
However, my Draw class draws 1D shapes, so you will need to rewrite this class a bit.

G
Griboks, 2021-09-18
@Griboks

for y consoleWindow.height {
 for x consoleWindow.width {
  if (inTrapezoid(x, y)) print('#');
  else print(' ');
 }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question