def get_style(is_white_cell, is_white_piece, is_selected, is_targeted):
    """Returns the associated style for the provided combination of piece and cell"""
    if is_white_cell: return 'white_cell'
    elif is_targeted: return 'magenta_cell'
    elif is_selected:
        if is_white_piece: return 'red_cell_white_piece'
        else: return 'red_cell_black_piece'
    elif is_white_piece: return 'black_cell_white_piece'
    else: return 'black_cell_black_piece'