add layer for android

This commit is contained in:
pengfei.zhou
2019-08-01 15:33:30 +08:00
parent 2e7814b499
commit 796de55cc4
5 changed files with 107 additions and 7 deletions

View File

@@ -174,7 +174,7 @@ class SnakeModel {
if (this.head.x < 0 || this.head.x >= this.width
|| this.head.y < 0 || this.head.y >= this.height) {
//If out of bound
loge('out of bound', this.head)
loge('out of bound')
this.state = State.fail
} else if (this.head.x == this.food.x && this.head.y == this.food.y) {
//If eat food