Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Felix Huther
Programmieren2
Commits
916d2b35
Commit
916d2b35
authored
Jun 12, 2022
by
Felix Huther
Browse files
character can move without pressing enter
parent
45016cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
DungeonCrawler/DungeonGame/terminalui.cpp
View file @
916d2b35
#include
"terminalui.h"
#include
<conio.h>
#include
<stdio.h>
TerminalUI
::
TerminalUI
(
Level
*
mCurrentLevel
)
...
...
@@ -23,6 +25,9 @@ void TerminalUI::draw(Level *pLevel) {
char
TerminalUI
::
askMoveFromUser
()
{
char
direction
=
{};
std
::
cout
<<
"What direction you want to move ?
\n
"
;
std
::
cin
>>
direction
;
direction
=
getch
()
;
return
direction
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment