This project implements a text-based version of the Assassin game using Python. Players are organized into a circular linked list called the "kill ring." Each player is stalking the next player in the list. When a player is "killed," they are removed from the kill ring and placed into a "graveyard." The game continues until there is only one player left in the kill ring, who is declared the winner.
Files Node.py: Contains the Node class that represents each player in the game. Assassin.py: Contains the Assassin class that manages the kill ring and the graveyard. main.py: The main driver program that initializes the game, reads player names from a file, and runs the game loop.
Shuffle Names: You will be asked if you want to shuffle the names. Enter y for yes or n for no.
Game Play:
The current state of the kill ring and graveyard will be displayed. Enter the name of the next victim when prompted. The name should match one of the names in the kill ring (case insensitive). The game will update the kill ring and graveyard accordingly. End Game: The game continues until only one player remains in the kill ring. The winner will be announced, and the final state of the graveyard will be displayed.
Example Output Welcome to the Assassin Manager
What name file do you want to use this time? name.txt Do you want the names shuffled? (y/n)? y
Current kill ring: Alan Turing is stalking Alan Kay Alan Kay is stalking John von Neumann John von Neumann is stalking Bill Gates Bill Gates is stalking Ada Lovelace Ada Lovelace is stalking Grace Hopper Grace Hopper is stalking Tim Berners-Lee Tim Berners-Lee is stalking Alonzo Church Alonzo Church is stalking Don Knuth Don Knuth is stalking Linus Torvalds Linus Torvalds is stalking Charles Babbage Charles Babbage is stalking Alan Turing
Current graveyard:
next victim? alan turing
Current kill ring: Alan Kay is stalking John von Neumann John von Neumann is stalking Bill Gates Bill Gates is stalking Ada Lovelace Ada Lovelace is stalking Grace Hopper Grace Hopper is stalking Tim Berners-Lee Tim Berners-Lee is stalking Alonzo Church Alonzo Church is stalking Don Knuth Don Knuth is stalking Linus Torvalds Linus Torvalds is stalking Charles Babbage Charles Babbage is stalking Alan Kay
Current graveyard: Alan Turing was killed by Charles Babbage
This project is licensed under the MIT License.