Share your repls and programming experiences

← Back to all posts
Buildings Obscured from View
SkipperBoop (6)

Thanks to @sojs on the Discord for recommending the fun idea! The numbers in the list are randomly generated and represent heights of buildings. The projects tells you which buildings an observer can see, and which are obscured by other buildings.

(Honestly I'm extremely proud of the ASCII buildings haha)

Comments
hotnewtop
sojs (341)

A new idea to advance this would be to make it all ASCII. For example, if there are 2 visible buildings, [2,4], you could have the ASCII like

      |
     ---
  | |   |
 ---|   |
| 2 | 4 |
|___|___|

I think that would be really cool. Bit harder to do, but cool nonetheless.

SkipperBoop (6)

@sojs It's funny that you say that! I had that idea but decided I wasn't going to try it. I think I'll give it a shot though :)

SkipperBoop (6)

I finished the feature! When I looked at your example I realized that underscores are a lot better for the roofs than hyphens, so now I have those :D

sojs (341)

so cool! Maybe add a check mark or something on the "left view" to signifiy it is visible? @SkipperBoop