# Word Wrestle

### Instruction:

Overview:
Hello folks, welcome to Word Wrestle.
WordWrestle is an n-player interactive game. You can play against a human or an AI, which has levels ranging from easy, medium, hard to choose from.

How the game works:
The game starts with the game server generating a random word W and presenting it to all players. On a turn, a player proposes a new word v whose beginning letters (prefix) may overlap with the last letters (suffix) of W. W is then extended by the suffix of v that doesn't overlap W. Thus, W keeps growing. The player is awarded points based on the square of the number of letters in the prefix of v that overlap the suffix of W. The goal of the game for each player is to maximize their points.

For example: Let's say 2 players A and B play 1 round of Word Wrestle.

At the beginning, the server gives a word, let's say it was "Hologram".
The next player would want to give a word that overlaps with any suffix of "Hologram", trying to maximize the overlap, in order to gain more points. So, A gives the word "grammar". A would get 4*4 = 16 points for this word.
Now the concatenated word is "Hologrammar".
In B's turn, it would want to find the maximum overlap with a suffix of this concatenated word. B says its word is "married". With "mar" as the overlap, B gets 3*3 = 9 points.
Hence this example game would end with A as the winner.

All players are given three Action Cards that apply to the changing W: 'Remove Last Letter', 'Flip Word' and 'Mirror Letters'. A player who uses an action card selects a word immediately after that use. The powers of the Action Cards are:
1. Remove Last Letter - Play this action to remove the last letter of the concatenated word W.
2. Flip Word - Reverses W and this becomes the new W.
3. Mirror Letters - Interchanges all occurances of 'u' with 'n', 'm' with 'w' and 'd' with 'b' and vice versa in W.

Rules:
1. A player can use each action card only once.
2. A player can use as many Action Cards in a single turn as they want.
3. You should not play any of the words that have been played so far by other players, including the initial word given by the server.
4. Only the root form of a word is allowed. For example, "play" is allowed, while "plays","played" and "playing" are not allowed.
Happy Wrestling!!