def resultToString(result, white):
    """
    The function returns if the game was won based on result and color of figures
    Input:
    result(str): result in format '1-0','1/2-1/2', '0-1'
    white(bool): True if white, False if black

    Output:
    str: result of a game: 'won', 'lost', 'tie' or 'unknown'
    """
    wonSet = {('1', True),
              ('0', False)}
    tieSet = {('1/2', True),
              ('1/2', False)}
    lostSet = {('1', False),
               ('0', True)}

    if (result.split("-")[0], white) in wonSet:
        return 'won'
    elif (result.split("-")[0], white) in tieSet:
        return 'tie'
    elif (result.split("-")[0], white) in lostSet:
        return 'lost'
    else:
        return 'unknown'