#include "cardgame.h" byte printCentered(byte row, const char *str) { word len = strlen(str); if (len > textScreenWidth) len = textScreenWidth; byte col = (byte) (textScreenWidth - len) >> 1; moveCursor(0, row); for (byte x = 0; x < col; ++x) putchar(' '); putstr(str, len); for (byte x = col; x < BYTES_PER_SCREEN_ROW; ++x) putchar(' '); return col; }