def string_at(win, y, x_base, msg, attr, align='left'):
    """Places a string at a particular place on the screen."""
    x = win.getmaxyx()[1]
    str_x = 1
    if align == 'center':
        str_x = x / 2 - len(msg) / 2
    elif align == 'right':
        str_x = x - len(msg) - 1
    str_x = str_x + x_base
    win.addstr(y, str_x, msg, attr)
