Make doors randomly on the rooms.
This commit is contained in:
parent
dd6d29ed7d
commit
69fa7d9e4e
2 changed files with 44 additions and 8 deletions
10
main.cpp
10
main.cpp
|
@ -23,7 +23,6 @@ using std::string;
|
|||
using namespace fmt;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
||||
int main() {
|
||||
using namespace ftxui;
|
||||
std::string reset_position;
|
||||
|
@ -43,6 +42,7 @@ int main() {
|
|||
string dead_yet = "NOT DEAD";
|
||||
|
||||
bool show_paths = false;
|
||||
bool bomb = false;
|
||||
|
||||
auto map = Renderer([&] {
|
||||
game_map.set_target(me);
|
||||
|
@ -63,6 +63,12 @@ int main() {
|
|||
}
|
||||
}
|
||||
|
||||
if(bomb) {
|
||||
/// draw
|
||||
bomb = false;
|
||||
c.DrawPointCircle(me.x*2, me.y*4, 4, Color::Red);
|
||||
}
|
||||
|
||||
c.DrawText(enemy.x*2, enemy.y*4, "!", Color::Red);
|
||||
c.DrawText(me.x*2, me.y*4, "@", Color::Blue);
|
||||
c.DrawText(goal.x*2, goal.y*4, "$", Color::Yellow);
|
||||
|
@ -95,6 +101,8 @@ int main() {
|
|||
y += 1;
|
||||
} else if(e == Event::ArrowUp) {
|
||||
y -= 1;
|
||||
} else if(e == Event::Backspace) {
|
||||
bomb = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue