Do you like to play Wordle?🎮
Are you a travel geek? ✈️
Do you love terminal-based games? 🙄
 If you answered yes to 2 of the above questions, then check out this application I coded in Python as a project for my course in Software Development at the Code Institute The game is similar to Wordle; however, instead of guessing a five-letter word, you have to think of an IATA code of an airport. You will be promoted with a hint about the airport's location before the game starts. 
I included only busy airports from Europe and North America for this project.
Introduction, menu and rules
At the start of every new game, the player is greeted with ASCII art and introduction text and a menu where they can choose to read the rules, play a new game, read the game credits or quit.
The menu is also displayed at the end of the games.
The introduction, ASCII art, rules and credits are stored in a separate Python file.
Hints and Airports
Some IATA codes are the initials of the name of the airport they represent (e.g. JFK for John Fitzgerald Kennedy, New York) or abbreviations of the city where they are located (e.g. DUB for Dublin Airport). However, in many cases, there is no clear association between the airport and its code (e.g. YYZ for Toronto Pearson International Airport).
Also, asking the players to guess any three-letter code could lead to frustration. They could spend all their six attempts before getting any clue.
Instead, a hint about the airport's location is displayed at the start of every new game to make the game easier to play. Also, the list of airports is limited to the one-hundred busiest airports in Europe and North America.
Clues
The game displays a line below the player's guess with Emojis symbols to provide feedback if the letters in the player's input match the ones in the airport code:
🟢 The green circle indicates that the letter is in the code and in the correct position.
🟡 The yellow circle means the letter is in the code but not in the right place.
⬜️ The grey square indicates that the letter is not part of the code.
All the player's attempts remain visible on the screen until the game is reset.
Back to Top