It might sound silly to think of a user interface inside of a command-line game engine, but what this really means is just the ability to have some text prompted inside of the game. This can be simply done by outputting some regular text below or above the game scene.
How this can be done:
A text/label object class (which would likely inherit from the GameObject class)
When the user wants a new text or label, he creates a new object of the label class which is initialized or assigned to some text
A draw function will then draw the text above or below the game window
Why this is necessary:
Most games need instructions for their players. Otherwise, it is unclear what the player is supposed to do.
Other potential features:
The player might want the game to be paused, and the player to be prompted, when a set of text shows up (such as a popup dialog box). This means the behavior of the labels can vary. This should be taken into account when creating a text/label class
It might sound silly to think of a user interface inside of a command-line game engine, but what this really means is just the ability to have some text prompted inside of the game. This can be simply done by outputting some regular text below or above the game scene.
How this can be done:
Why this is necessary: Most games need instructions for their players. Otherwise, it is unclear what the player is supposed to do.
Other potential features: The player might want the game to be paused, and the player to be prompted, when a set of text shows up (such as a popup dialog box). This means the behavior of the labels can vary. This should be taken into account when creating a text/label class