ProodjePindakaas / Quantum-Werewolf

The python script for running a game of Quantum Werewolf
MIT License
2 stars 0 forks source link

Hunter must kill dead player #17

Closed ProodjePindakaas closed 9 months ago

ProodjePindakaas commented 1 year ago

The hunter dies during the night. According to the game, there are no valid players. Hunter still able to kill someone, but the player is already dead.

The day begins alpha was killed during the night alpha was the hunter alpha must now kill another player

[HUNTER] alpha, who do you shoot? Name: "alpha" is not a valid choice Valid players are:

[HUNTER] alpha, who do you shoot? Name: zeta was killed by the hunter zeta was a villager eta was killed during the night eta was a werewolf Traceback (most recent call last): File "./Quantum-Werewolf/tests/../cli.py", line 276, in process_deaths() File "./Quantum-Werewolf/tests/../cli.py", line 274, in process_deaths print_kill(player) File "./Quantum-Werewolf/tests/../cli.py", line 257, in print_kill player_role = g.kill(player) File "./Quantum-Werewolf/quantumwerewolf.py", line 216, in kill assert self.killed[target_id] != 1, "ERROR:in kill() target {} is already dead.".format(target) AssertionError: ERROR:in kill() target zeta is already dead.

ProodjePindakaas commented 1 year ago

Probably caused by the prompt of the hunter action being given as soon as the hunter player is killed in the killed list in process_deaths() and not killing the other dead players first.