Develop a Rust program that simulates a simple text-based game of Hangman. The program should allow players to guess letters to reveal a hidden word within a limited number of attempts. The program should accomplish the following tasks:
- Select Word: Choose a random word from a predefined list of words .
- Display Hidden Word: Show the partially revealed word with underscores for unrevealed letters.
- Guess Letter: Allow the player to guess a letter.
- Update Display: Update the displayed word to reveal correctly guessed letters.
- Track Attempts: Keep track of the remaining attempts and display them to the player.
- End Game: End the game when the player either correctly guesses the word or runs out of attempts.
- Implement the program in Rust.
- Utilize Rust's standard libraries for user input and randomization.
- Ensure the list of words is hardcoded within the program to prevent copying from the web.
- Provide a clear and intuitive command-line interface (CLI) for players to interact with the game.
- Write clean and well-documented code.
- Implement error handling for user input and game logic.
- Avoid using external crates/libraries for core functionality.
Candidates will be evaluated based on:
- Correctness and completeness of game logic.
- Clarity and readability of the code.
- Proper error handling for user input and game logic.
- Efficiency of random word selection and display updating.
- Adherence to Rust best practices and idioms.