def hangPlayer(victim_userID): killer = "Voters" loc = [0,0] cur_kill = Kill() cur_kill.setKillerID(killer) cur_kill.setVictimID(victim_userID) cur_kill.setTimestamp() cur_kill.setLocation(loc[0], loc[1]) killDAO.registerKill(cur_kill) #updating victim to dead playerDAO.updatePlayer(victim_userID, "isDead", True) return True
def killPlayer(killer_userID, victim_userID): killer = playerDAO.getPlayer(killer_userID) game = gamesDAO.getGame() if killer["alignment"] == "Werewolf": #getting location data for kill killer_loc = getCurrentLocation(killer_userID) cur_kill = Kill() cur_kill.setKillerID(killer_userID) cur_kill.setVictimID(victim_userID) cur_kill.setTimestamp() cur_kill.setLocation(killer_loc[0], killer_loc[1]) killDAO.registerKill(cur_kill) #updating victim to dead playerDAO.updatePlayer(victim_userID, "isDead", True) test_conf = playerDAO.increasePlayerPoints(killer_userID, 10) return True else: return False