Play the FLAMES Game Using Python
FLAMES is a fun game for children standing for Friends, Lovers, Affectionate, Marriage, and Enemies. The game takes the names of two people and, with a series of steps, determines their relationship. To play FLAMES, note down the names of the two people, eliminate the matching letters, and get the count of the characters left.
Iterate over the letters of the word, FLAMES using the count and remove that letter. For example, if the count is four, remove the letter M. The count begins from E again. Repeat this process until only one letter remains, which denotes the relationship status.

The Tkinter Module
To build the FLAMES game, you will use the Tkinter module. Tkinter is a cross-platform, simple, and user-friendly module that you can use to create graphical user interfaces rapidly. Some of the applications you can build as a beginner using Tkinter include aMusic Player,Calendar,Weight Conversion Tool, and aWord Jumble Game.
To install tkinter in your system, run the following command in the terminal:

How to Build FLAMES Game Using Python
you’re able to find the source code of the FLAMES game using Python in thisGitHub repository.
Import the Tkinter module. Define a function,remove_match_char()that accepts two lists as input. Use a nested for loop to iterate over both lists. Check if there’s a matching character; if there is, remove it from both lists and create a third list that concatenates both lists with an asterisk in between. The asterisk acts as a delimiter.

Return the third list along with the match found as True. In case no letters match, return the list as created above.
Define a function,tell_status(). Retrieve the name of the person the user entered using theget()method on the Entry widget. Convert all the letters to lowercase and eliminate any spaces in between. Convert the name into a list of characters. Repeat this with the name of the second person and set theproceedvariable toTrue.

Until the value of proceed is true, call theremove_match_char()function and pass the two lists you just created. Store the concatenated list and the flag status received from the function. Find the index of the asterisk you inserted and slice the strings into two lists before and after it.
Count the number of characters in the two lists and define a list that stores the various status a relationship can have as per the FLAMES game.

Until the letters in the result list are not zero, store the index value from where you have to perform the slicing. If the index is greater than or equals zero, slice the lists into two parts and store the concatenated string with the right part added first in order. This ensures you can count in an anticlockwise direction.
Insert the result into the status field at the first character position to display the relationship status.
Define a function,clear_all(). Use the delete() function from the first index to the last on the three entry fields to clear out the contents displayed on the screen. Use the focus_set() method on the first entry field to activate and indicate the user to enter values in it.
Initialize the Tkinter instance and display the root window by passing it to the class. Set the background color of your choice, the size, and the title of your application.
Define three labels to denote the two persons and their relationship status. Set the parent window you want to place them in, the text it should display, the font color, the background color, and the font styles. Add some padding in the horizontal direction.
Use the grid manager to arrange the three widgets in the first column. Place the first label in the second row, the second label in the third row, and the third label in the fourth row.
Define three entry widgets to get the values of the two persons and display their status. Set the parent window you want to place the widgets in and the font styles it should have.
Similarly, use the grid manager, to organize the widgets in the second column. Use theipadxproperty to set the number of pixels to pad inside the borders of the widget.
Define two buttons,SubmitandClear. Set the parent window you want to place them in, the text it should display, the background color, the font color, the functions they should execute when clicked, and the font styles.
Use the grid manager to place the buttons in the fourth and sixth row of the second column respectively.
Themainloop()function tells Python to run the Tkinter event loop and listen for events until you close the window.
Put all the code together, and get ready to play the FLAMES game at your fingertips.
Sample Output of the FLAMES Game
On running the program above, the program displays the FLAMES game application with three labels, three entry fields, and two buttons arranged in a grid. On entering the names “Tony Stark” and “Pepper Potts”, the program displays their relationship status as “Love”.
Games You Can Build Using Python
Pygame, Arcade, Panda3D, PyOpenGL, and Pyglet are some useful modules you can build Python games with. Using Pygame you can build 2D games like Super Mario Bros, Flappy Bird, and Snake. Using Arcade you can build a Pac-Man, Asteroids, or Breakout clone.
Panda3D can help you build 3D games like Toontown Online, Pirates of the Caribbean Online, and Disney’s Virtual Magic Kingdom.
Test your anagram and vocabulary skills by writing a program that flexes your programming skills too.
You’ve been quoting these famous films wrong all along!
Who asked for these upgrades?
The fix was buried in one tiny toggle.
Some subscriptions are worth the recurring cost, but not these ones.
Taming data is easier than it looks.