cdkw2 / conway-screensaver

A conways game of life screensaver for the terminal
MIT License
17 stars 1 forks source link

status line #11

Open hymie0 opened 5 days ago

hymie0 commented 5 days ago

You over-write your status line by making your grid the full size of your terminal screen.

On line 184, change

mvprintw(HEIGHT - 1, 0, "Glider spawned at (%d, %d)", rx, ry);

to

mvprintw(HEIGHT , 0, "Glider spawned at (%d, %d)", rx, ry);

Then, right after every call to getmaxyx , add HEIGHT-- or new_height--

cdkw2 commented 3 days ago

I think you are referring to that text that pops up in the bottom line and then immediately disappears that says Glider spawned at (x,y) @elbachir-one submitted the pull request with it and I kept it because I liked it!

cdkw2 commented 3 days ago

And if you are talking about that Generation: abc | press 'q' to quit, 'r' to reset I had it in the initial build but after using the program for a little it seemed a little out of place (imo) but after the pull request was merged I noticed that it was gone and I didnt care.

hymie0 commented 2 days ago

The blinking-and-disappearing "Glider spawned" was what caught my attention, but then I noticed that there was (or was supposed to be) the "Generations: abc" line, and that was what I eventually wrote about. You're right, it doesn't add anything other than an interesting tidbit.

I might suggest adding an "h" key option that might pause the simulation and pop up a window with the list of key strokes. That might give you freedom to expand the in-simulation options (for example, "g" for "generate a glider right now"), and the current "Generation" line wouldn't be long enough.

cdkw2 commented 2 days ago

The blinking-and-disappearing "Glider spawned" was what caught my attention, but then I noticed that there was (or was supposed to be) the "Generations: abc" line, and that was what I eventually wrote about. You're right, it doesn't add anything other than an interesting tidbit.

I might suggest adding an "h" key option that might pause the simulation and pop up a window with the list of key strokes. That might give you freedom to expand the in-simulation options (for example, "g" for "generate a glider right now"), and the current "Generation" line wouldn't be long enough.

thats a great idea but I am a little low on time nowadays because of my exams, will remember this for the future, thanks for the suggestion :+1: