def build_message(history_record, game):
    """Builds the endpoint message from the game and current history record"""
    msg = ""
    if history_record[0].result == 'Good guess':
        msg += "Good guess! | "
    else:
        msg += "Wrong guess... | "

    msg += game.current_game + " | "
    msg += "Strike(s) left: " + str(game.strikes_left) + " | "

    if game.game_over is False:
        msg += "Carry on!"
    if game.game_over is True:
        if game.game_won is True:
            msg += "YOU WON!"
        else:
            msg += "YOU LOST!"

    return msg