namespace BombsAwayGame; /// /// Represents an interface for supplying data to the game. /// /// /// Abstracting the UI allows us to concentrate its concerns in one part of our code and to change UI behavior /// without creating any risk of changing the game logic. It also allows us to supply an automated UI for tests. /// public interface IUserInterface { /// /// Display the given message. /// /// Message to display. void Output(string message); /// /// Choose an item from the given choices. /// /// Message to display. /// Choices to choose from. /// Index of choice in that user chose. int Choose(string message, IList choices); /// /// Allow user to choose Yes or No. /// /// Message to display. /// True if user chose Yes, false if user chose No. bool ChooseYesOrNo(string message); /// /// Get integer from user. /// /// Integer supplied by user. int InputInteger(); }