mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 09:53:38 +02:00
main(): Clear screen between ticks
This commit is contained in:
parent
56979634bf
commit
1b8a830191
1 changed files with 8 additions and 0 deletions
8
main.cc
8
main.cc
|
@ -38,6 +38,13 @@ next_agent:
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clear(void)
|
||||
{
|
||||
printf("\033[H\033[J");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -77,6 +84,7 @@ main(int argc, char *argv[])
|
|||
/* Main tick loop. */
|
||||
|
||||
while (true) {
|
||||
clear();
|
||||
std::cout << "tick " << tick_id << '\n';
|
||||
|
||||
/* Drop disconnected agents. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue