Use case statement in Logic.huffman_assign_code