From: Geoffrey Allott Date: Tue, 6 Dec 2022 19:15:09 +0000 (+0000) Subject: change \a to beep() X-Git-Url: https://git.pointlesshacks.com/?a=commitdiff_plain;h=5918e6a9ae0c2c59af23eff5fa320fe07664a665;p=snake.git change \a to beep() --- diff --git a/snake.py b/snake.py index 94c5ba8..664eab9 100644 --- a/snake.py +++ b/snake.py @@ -88,22 +88,22 @@ class GameArea: ch = self.win.getch() if ch == curses.KEY_LEFT or ch == ord('h'): if self.dir == Direction.Right: - print('\a', end='') + curses.beep() else: self.dir = Direction.Left if ch == curses.KEY_RIGHT or ch == ord('l'): if self.dir == Direction.Left: - print('\a', end='') + curses.beep() else: self.dir = Direction.Right if ch == curses.KEY_UP or ch == ord('k'): if self.dir == Direction.Down: - print('\a', end='') + curses.beep() else: self.dir = Direction.Up if ch == curses.KEY_DOWN or ch == ord('j'): if self.dir == Direction.Up: - print('\a', end='') + curses.beep() else: self.dir = Direction.Down if ch == 27 or ch == ord('p'):