mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 02:13:35 +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
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -77,6 +84,7 @@ main(int argc, char *argv[])
|
||||||
/* Main tick loop. */
|
/* Main tick loop. */
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
clear();
|
||||||
std::cout << "tick " << tick_id << '\n';
|
std::cout << "tick " << tick_id << '\n';
|
||||||
|
|
||||||
/* Drop disconnected agents. */
|
/* Drop disconnected agents. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue