console programming without scrolling
I am not really sure how to describe it, but here it goes... I started with python a couple of months ago. It is going pretty good. Several of my bash scripts have been converted over to python. I use python every other day at work. Sometimes, I want to challenge myself with new projects.
Back in high school, we had a computer club. The teacher wrote a fish-shark simulation (Wa-Tor). For some reason, I remembered it and I started to write it program. Here is my problem, the program gets my terminal window's rows and columns. My entire fish world is size of the terminal window. Every other move, I want the fish world to be re-drawn. My only problem is that 'print my_ocean' ends up just scrolling.
Example: Chronos 1: print Chronos 2: print
I just want to update the same screen over and over.
Is it possible to stay on your current screen and update it, instead of scrolling? The scrolling does not always look that pretty.
Does that make sense?
6 comments · 93% upvoted · other discussions
You're looking for access where you can update parts of the screen, by using curses or even libtcod
StorageNinja [OP] 1 points · Jan 2016
I started to dig into curses this morning. Let's see how that works out :)