Skip to content

Commit

Permalink
main routine to start game
Browse files Browse the repository at this point in the history
  • Loading branch information
OneCodeMonkey committed Jul 2, 2019
1 parent 3fcb076 commit 69354af
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions funnyGames/BashSnake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,17 @@ game_loop() {
#signals the input loop that the snake is dead
kill -$SIG_DEAD $$
}
clear_game() {
stty echo
echo -e "\e[?25h"
}
init_game
init_snake
give_food
draw_board
game_loop &
game_pid=$!
getchar
clear_game
exit 0

0 comments on commit 69354af

Please sign in to comment.