import zlib
import hashlib


def get_player_seed(game_id, power_name):
    """ Returns a unique player seed given a game id and a power name """
    crc_adler32 = zlib.adler32(game_id.encode('utf-8') + power_name.encode('utf-8'))
    sha256_hash = hashlib.sha256()
    sha256_hash.update(crc_adler32.to_bytes((crc_adler32.bit_length() + 7) // 8, 'big'))
    sha256_hash.update(game_id.encode('utf-8'))
    return int.from_bytes(sha256_hash.digest()[8:12], 'big') % (2 ** 31 - 1)