aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-02 22:09:58 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-02 22:10:24 +0100
commitf235a5cb76aaec0c22a4cd5f97973d3d41593443 (patch)
tree9039927c78adff0fdbd5b2d6faf385d200c540f1
parentc4bc02521806d9e73d41e7cbebdb760e8b28b58a (diff)
Indicate whether a bot is active on the printout
-rw-r--r--world.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/world.cpp b/world.cpp
index fecd956..b38979a 100644
--- a/world.cpp
+++ b/world.cpp
@@ -323,8 +323,9 @@ void World::print(ScreenBuffer &sb) const {
for(int x=0;x<SIZE;x++){
if(board[y][x]==nullptr)sb.printf("..");
else {
- char c="^>v<"[board[y][x]->heading%4];
- sb.printf("%c%c",c,c);
+ char c2="^>v<"[board[y][x]->heading%4];
+ char c1=board[y][x]->active?c2:'X';
+ sb.printf("%c%c",c1,c2);
}
sb.printf(" ");
}