import math
import random


def getAffected(state, Pop):
    """Determines the # of people to affect based on a Town's pop"""

    if state == 'burning':
        return math.ceil(random.randrange(1,Pop)*.75)
    elif state == 'eating':
        return math.ceil(random.randrange(1,Pop)*.05)
    elif state == 'looting':
        return math.ceil(random.randrange(1,Pop)*.05)
    else: return 0