minor bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-04-25 00:55:32 +03:00
parent 7d147d907d
commit 87d8548440
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# Timestamp: 20170425004451 # Timestamp: 20170425005505
CACHE: CACHE:
simplesnake.html simplesnake.html

View File

@ -394,13 +394,13 @@ function makeTapHandler(snake){
clearHints() clearHints()
// top of screen (1/8)... // top of screen (1/8)...
;(event.clientY || event.changedTouches[0].pageY) <= (document.body.clientHeight / 8) ? ;(event.clientY || event.changedTouches[0].pageY) <= (window.innerHeight / 8) ?
setup() setup()
// bottom of screen 1/8... // bottom of screen 1/8...
: (event.clientY || event.changedTouches[0].pageY) >= (document.body.clientHeight / 8)*8 ? : (event.clientY || event.changedTouches[0].pageY) >= (window.innerHeight / 8)*7 ?
Snake.pause() Snake.pause()
// left/right of screen... // left/right of screen...
: (event.clientX || event.changedTouches[0].pageX) <= (document.body.clientWidth / 2) ? : (event.clientX || event.changedTouches[0].pageX) <= (window.innerWidth / 2) ?
Snake.left() Snake.left()
: Snake.right() }} : Snake.right() }}