{"id":298676,"student_id":2589,"content":"","created_at":"2021-09-23T17:57:56.778+08:00","updated_at":"2023-07-23T09:34:43.040+08:00","name":"小精靈遊戲 AI - 試玩版","language":"javascript","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/298676/0815fa4c2576f81947e7deac4f2d75ee.jpg"},"parent_id":3,"plugin":"setBackdrop('black');\n\nvar MODE; // chase, scatter, frightened\nvar tmpMODE;\nvar width = 15;\nvar offsetX = 110 + 7;\nvar offsetY = 15;\nvar food = [];\nvar level = 1;\nvar score = 0;\nvar timer = 0;\nvar life = 3;\nvar bestScore = 0;\nvar bonus = 100; // 吃掉鬼魂的獎勵\nvar startTime = Date.now();\nvar map = [\n '┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━┓',\n '┃............┃┃............┃',\n '┃.┏━━┓.┏━━━┓.┃┃.┏━━━┓.┏━━┓.┃',\n '┃.┃ ┃.┃ ┃.┃┃.┃ ┃.┃ ┃.┃',\n '┃*┗━━┛.┗━━━┛.┗┛.┗━━━┛.┗━━┛*┃',\n '┃..........................┃',\n '┃.┏━━┓.┏┓.┏━━━━━━┓.┏┓.┏━━┓.┃',\n '┃.┗━━┛.┃┃.┗━━┓┏━━┛.┃┃.┗━━┛.┃',\n '┃......┃┃....┃┃....┃┃......┃',\n '┗━━━━┓.┃┗━━┓.┃┃.┏━━┛┃.┏━━━━┛',\n ' ┃.┃┏━━┛.┗┛.┗━━┓┃.┃ ',\n ' ┃.┃┃ ┃┃.┃ ',\n ' ┃.┃┃ ┏━┓ ┏━┓ ┃┃.┃ ',\n '━━━━━┛.┗┛ ┃┏┛ ┗┓┃ ┗┛.┗━━━━━',\n ' ┃┃ ┃┃ ',\n '━━━━━┓.┏┓ ┃┗━━━━┛┃ ┏┓.┏━━━━━',\n ' ┃.┃┃ ┗━━━━━━┛ ┃┃.┃ ',\n ' ┃.┃┃ ┃┃.┃ ',\n ' ┃.┃┃ ┏━━━━━━┓ ┃┃.┃ ',\n '┏━━━━┛.┗┛ ┗━━┓┏━━┛ ┗┛.┗━━━━┓',\n '┃............┃┃............┃',\n '┃.┏━━┓.┏━━━┓.┃┃.┏━━━┓.┏━━┓.┃',\n '┃.┗━┓┃.┗━━━┛.┃┃.┗━━━┛.┃┏━┛.┃',\n '┃*..┃┃.......┃┃.......┃┃..*┃',\n '┗━┓.┃┃.┏┓.┏━━┛┗━━┓.┏┓.┃┃.┏━┛',\n '┏━┛.┗┛.┃┃.┗━━┓┏━━┛.┃┃.┗┛.┗━┓',\n '┃......┃┃....┃┃....┃┃......┃',\n '┃.┏━━━━┛┗━━┓.┃┃.┏━━┛┗━━━━┓.┃',\n '┃.┗━━━━━━━━┛.┗┛.┗━━━━━━━━┛.┃',\n '┃..........................┃',\n '┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛',\n]\n\nforever(function() {\n print('best: ' + bestScore, 10, 20, 'gold');\n print('score: ' + score, 10, 40, '#fff');\n print('level: ' + level, 10, 60, '#fff');\n print('mode: ' + MODE, 10, 80, '#fff');\n});\n\n// 地圖\nvar grid = (function (M) {\n var grid = {};\n for (var x = 0; x \u003c 28; x++) {\n grid[x] = {};\n for (var y = 0; y \u003c 31; y++) {\n var b = createSprite(['block_1.png', 'block_2.png', 'food.png', 'empty.png']);\n b.x = x*width + offsetX;\n b.y = y*width + offsetY;\n b.role = M[y][x];\n var t = M[y][x];\n b.scale = 1/7;\n b.isWall = ['┃', '━', '┛', '┗', '┏', '┓'].indexOf(t) !== -1\n if (['┃', '━', '┛', '┗', '┏', '┓'].indexOf(t) != -1) b.role = 'x';\n if (t == '━' || t == '┃') b.costumeId = 1;\n if (t == '.' || t == '*') b.costumeId = 2;\n if (t == ' ') b.costumeId = 3;\n if (t == '.') b.scale *= 0.25;\n if (t == '*') b.scale *= 0.5;\n if (t == '━') b.direction = 0;\n if (t == '┓') b.direction = 0;\n if (t == '┗') b.direction = 180;\n if (t == '┏') b.direction = 270;\n if (t == '.' || t == '*') food.push(b);\n grid[x][y] = b;\n }\n }\n\n for (var x = 0; x \u003c 28; x++) {\n for (var y = 0; y \u003c 31; y++) {\n var b = grid[x][y];\n b.count = 0;\n b.X = x;\n b.Y = y;\n if (x \u003e 0 \u0026\u0026 grid[x-1][y] \u0026\u0026 !grid[x-1][y].isWall) {\n b.left = grid[x-1][y];\n b.count++;\n }\n if (x \u003c 27 \u0026\u0026 grid[x+1][y] \u0026\u0026 !grid[x+1][y].isWall) {\n b.right = grid[x+1][y];\n b.count++;\n }\n if (y \u003c 30 \u0026\u0026 grid[x][y+1] \u0026\u0026 !grid[x][y+1].isWall) {\n b.bottom = grid[x][y+1];\n b.count++;\n }\n if (y \u003e 0 \u0026\u0026 grid[x][y-1] \u0026\u0026 !grid[x][y-1].isWall) {\n b.top = grid[x][y-1];\n b.count++;\n }\n }\n }\n\n forever(function() {\n pen.color = 'orange';\n pen.size = 4;\n pen.drawLine(299, 202, 341, 202);\n });\n return grid;\n})(map);\n\n\nfunction Player (costumes) {\n \n var s = createSprite(costumes);\n \n s.rotationStyle = 'fixed';\n s.speed = 1;\n s.X = 0;\n s.Y = 0;\n s.release = false;\n s.target = grid[0][0]; // 要移動到的目標格子\n \n s.mode = 'chase'; // chase, scatter, frightened, dead, leave\n \n s.forever(function() {\n s.updatePosition(); // 移動角色\n s.updateCostume(); // 更新造型\n });\n\n // 更新角色座標,朝著 target 的格子前進\n s.updatePosition = function () {\n\n if (s.release === false || MODE === 'pause') return;\n \n if (this.distanceTo(this.target) \u003e this.speed) {\n this.toward(this.target);\n this.stepForward(this.speed);\n } else {\n this.moveTo(this.target);\n this.X = this.target.X;\n this.Y = this.target.Y;\n this.decision();\n this.updateTarget();\n }\n }\n\n // 執行 AI 相關指令決策出下一個要移動的方向 nextDirection\n s.decision = function () {\n\n if (s.AI) s.AI();\n\n if (s.target.count \u003e= 3) {\n if (this.mode === 'chase' \u0026\u0026 s.chaseAI) s.chaseAI();\n if (this.mode === 'scatter' \u0026\u0026 s.scatterAI) s.scatterAI();\n if (this.mode === 'frightened' \u0026\u0026 s.frightenedAI) s.frightenedAI();\n if (this.mode === 'dead' \u0026\u0026 s.backToHouseAI) s.backToHouseAI();\n }\n \n if (this.mode === 'leave') this.leaveAI();\n }\n \n // 如果有 nextDirection 且是可以行走的格子\n // 更新下一個移動的目標 target\n s.updateTarget = function () {\n if (this.nextDirection == 0 \u0026\u0026 this.target.top) this.target = this.target.top;\n if (this.nextDirection == 90 \u0026\u0026 this.target.right) this.target = this.target.right;\n if (this.nextDirection == 180 \u0026\u0026 this.target.bottom) this.target = this.target.bottom;\n if (this.nextDirection == 270 \u0026\u0026 this.target.left) this.target = this.target.left;\n this.nextDirection = undefined;\n }\n \n // 角色造型切換\u0026移動時的動畫\n s.updateCostume = function () {\n this.costumeId = Math.floor(this.direction/90);\n \n if (this.mode == 'dead') this.costumeId += 8;\n if (this.mode == 'frightened') this.costumeId = 12;\n \n if (this.distanceTo(this.target) == 0) return;\n\n var bool = Math.floor(timer/150)%2 == 0;\n if (bool \u0026\u0026 (this.mode === 'chase' || MODE === 'scatter')) {\n this.costumeId += 4;\n }\n if (bool \u0026\u0026 this.mode === 'frightened') {\n this.costumeId += 1;\n }\n }\n \n // 離開鬼屋\n s.leaveAI = function () {\n if (s.target.top) s.nextDirection = 0;\n else if (s.target.right) s.nextDirection = 90;\n else if (s.target.left) s.nextDirection = 270;\n else s.nextDirection = 180;\n }\n\n // 角色轉向\n s.reverse = function () {\n if (this.direction == 0 \u0026\u0026 this.target.bottom) this.target = this.target.bottom;\n if (this.direction == 90 \u0026\u0026 this.target.left) this.target = this.target.left;\n if (this.direction == 180 \u0026\u0026 this.target.top) this.target = this.target.top;\n if (this.direction == 270 \u0026\u0026 this.target.right) this.target = this.target.right;\n }\n \n s.reset = function (x, y, direction) {\n s.X = x;\n s.Y = y;\n s.direction = direction;\n s.nextDirection = direction;\n s.target = grid[x][y];\n s.moveTo(grid[x][y]);\n }\n\n return s;\n}\n\n// 初始化四隻鬼魂、玩家角色\nvar Clyde = Player(['o1.png', 'o2.png', 'o3.png', 'o4.png', 'o5.png', 'o6.png', 'o7.png', 'o8.png', 'o9.png', 'o10.png', 'o11.png', 'o12.png', 'f13.png', 'f14.png']);\nvar Inky = Player(['b1.png', 'b2.png', 'b3.png', 'b4.png', 'b5.png', 'b6.png', 'b7.png', 'b8.png', 'b9.png', 'b10.png', 'b11.png', 'b12.png', 'f13.png', 'f14.png']);\nvar Pinky = Player(['p1.png', 'p2.png', 'p3.png', 'p4.png', 'p5.png', 'p6.png', 'p7.png', 'p8.png', 'p9.png', 'p10.png', 'p11.png', 'p12.png', 'f13.png', 'f14.png']);\nvar Blinky = Player(['r1.png', 'r2.png', 'r3.png', 'r4.png', 'r5.png', 'r6.png', 'r7.png', 'r8.png', 'r9.png', 'r10.png', 'r11.png', 'r12.png', 'f13.png', 'f14.png']);\nvar player = Player(['player_1.png', 'player.png', 'player_3.png', 'player_4.png', 'player_5.png', 'player_6.png', 'player_7.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png']);\nvar ghosts = [Blinky, Inky, Pinky, Clyde];\n\nfunction restart () {\n MODE = 'pause';\n setTimeout(() =\u003e MODE='scatter', 2000);\n startTime = Date.now();\n Blinky.reset(12, 14, 90);\n Pinky.reset(13, 14, 90);\n Inky.reset(14, 14, 90);\n Clyde.reset(15, 14, 90);\n player.reset(13, 17, 90);\n}\nrestart();\n\nplayer.scale = 2;\nplayer.release = true;\nghosts.forEach((g) =\u003e g.scale = 0.23);\n\n// 神奇的傳送門\nghosts.concat(player).forEach((s) =\u003e {\n s.forever(function () {\n if (s.X == 1 \u0026\u0026 s.Y == 14 \u0026\u0026 s.distanceTo(grid[1][14]) == 0) {\n s.target = grid[25][14];\n s.moveTo(grid[26][14]);\n }\n if (s.X == 26 \u0026\u0026 s.Y == 14 \u0026\u0026 s.distanceTo(grid[26][14]) == 0) {\n s.target = grid[2][14];\n s.moveTo(grid[1][14]);\n }\n });\n});\n\n// 更新鬼魂的模式\nforever(function () {\n ghosts.forEach(function (g) {\n if (g.release === false) return g.mode = '';\n \n if (g.distanceTo(player) \u003c width) {\n if (g.mode === 'frightened') {\n score += bonus;\n bonus *= 2;\n g.mode = 'dead';\n createText('+'+bonus, g.x, g.y);\n }\n \n if (MODE !== 'frightened') {\n if (!window.immortal) {\n restart();\n life -= 1;\n if (life \u003c 0) {\n if (score \u003e bestScore) bestScore = score;\n life = 3;\n level = 1;\n } \n }\n }\n }\n \n if (g.mode !== 'dead') g.mode = MODE;\n \n if (g.x \u003e 270 \u0026\u0026 g.x \u003c 370 \u0026\u0026 g.y \u003e 190 \u0026\u0026 g.y \u003c 240) {\n g.mode = 'leave';\n }\n })\n});\n\nforever(function() {\n \n // 如果切換模式則鬼魂進行轉向\n if (tmpMODE !== MODE) {\n bonus = 100; // 疊加獎勵恢復成 100\n ghosts.forEach(function (g) {g.reverse()});\n }\n tmpMODE = MODE;\n \n if (MODE == 'pause') return;\n \n // 遊戲經過時間\n timer = Date.now() - startTime;\n\n if (MODE == 'frightened') return;\n \n // level 1\n if (level == 1) {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n // level 2 ~ 4\n } else if (level \u003c 5) {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n // level 5 以上\n } else {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n }\n\n Blinky.release = timer \u003e 0;\n Pinky.release = timer \u003e 5000;\n Inky.release = timer \u003e 8000;\n Clyde.release = timer \u003e 11000;\n \n if (window.forceMode) {\n if (['scatter', 'chase', 'frightened'].includes(forceMode)) {\n MODE = forceMode\n }\n }\n});\n\nforever(function() {\n var limit = 2;\n var playerSpeed;\n var ghostsSpeed;\n // level 1\n if (level == 1) {\n if (MODE == 'frightened') {\n playerSpeed = limit*0.9;\n ghostsSpeed = limit*0.5;\n } else {\n playerSpeed = limit*0.8;\n ghostsSpeed = limit*0.75;\n }\n }\n // level 2 ~ 4\n else if (level \u003c 5) {\n if (MODE == 'frightened') {\n playerSpeed = limit*0.95;\n ghostsSpeed = limit*0.55;\n } else {\n playerSpeed = limit*0.9;\n ghostsSpeed = limit*0.85;\n }\n }\n // level \u003e= 5\n else {\n if (MODE == 'frightened') {\n playerSpeed = limit*1.0;\n ghostsSpeed = limit*0.6;\n } else {\n playerSpeed = limit*1.0;\n ghostsSpeed = limit*0.95;\n }\n }\n ghosts.forEach((g) =\u003e {\n if (g.mode == 'dead') g.speed = 10;\n else g.speed = ghostsSpeed;\n });\n player.speed = playerSpeed;\n});\n\nforever(function() {\n var success = true;\n food.forEach((f) =\u003e {\n success = f.hidden \u0026\u0026 success;\n if (!f.hidden \u0026\u0026 f.distanceTo(player) \u003c 5) {\n f.hidden = true;\n score += 10;\n if (f.role == '*') {\n MODE = 'frightened';\n setTimeout(function() {\n MODE = '';\n }, 8000);\n }\n }\n });\n if (success) nextLevel();\n});\n\nvar texts = [];\nfunction createText (text, x, y) {\n texts.push([text, x, y]);\n setTimeout(function () {\n texts.shift();\n }, 2000);\n forever(function(){\n texts.forEach(function (t) {\n print(t[0], t[1] - width, t[2] - width/2, 'lightblue', 14);\n });\n });\n}\n\nfunction nextLevel() {\n for (var x = 0; x \u003c 28; x++) {\n for (var y = 0; y \u003c 31; y++) {\n grid[x][y].hidden = false;\n }\n }\n restart();\n level++;\n}\n\n// 標記\nvar redTarget = createSprite('red_target.png');\nvar pinkTarget = createSprite('pink.png');\nvar blueTarget = createSprite('blue_target.png');\nvar orangeTarget = createSprite('orange_target.png');\n[redTarget, pinkTarget, blueTarget, orangeTarget].forEach((t) =\u003e {\n t.scale = 1.2/7;\n t.rotationStyle = 'fixed';\n t.hidden = true;\n});\n\nfor (var x=0; x\u003c31; x++) {\n for (var y=0; y\u003c28; y++) {\n if (map[x][y] == '.' || map[x][y] == '*') {\n map[x] = map[x].substr(0, y) + ' ' + map[x].substr(y + 1)\n }\n } \n}\n\n// 顯示剩餘生命\nvar lifes = [\n createSprite('player.png'),\n createSprite('player.png'),\n createSprite('player.png'),\n];\nfor (var i=0; i\u003c3; i++) {\n lifes[i].moveTo(80, 350 + 40*i);\n lifes[i].scale = 2;\n}\nforever(function(){\n if (life \u003c= 0) lifes[2].hidden = true;\n if (life \u003c= 1) lifes[1].hidden = true;\n if (life \u003c= 2) lifes[0].hidden = true;\n});\n\n\n\n// 強制設定模式 chase, scatter, frightened\n// forceMode = 'chase' // 設定強制模式\n// immortal = true // 無敵狀態\n\nredTarget.hidden = false;\nblueTarget.hidden = false;\npinkTarget.hidden = false;\norangeTarget.hidden = false;\n\n\nplayer.AI = function () {\n if (key.up) player.nextDirection = 0;\n if (key.right) player.nextDirection = 90;\n if (key.down) player.nextDirection = 180;\n if (key.left) player.nextDirection = 270;\n}\n\n/* ========== 預設 AI ========== */\nBlinky.AI = function () {\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n var rand = Math.floor(Math.random()*arr.length);\n Blinky.nextDirection = arr[rand];\n}\n\nPinky.AI = function () {\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n var rand = Math.floor(Math.random()*arr.length);\n Pinky.nextDirection = arr[rand];\n}\n\nInky.AI = function () {\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n var rand = Math.floor(Math.random()*arr.length);\n Inky.nextDirection = arr[rand];\n}\n\nClyde.AI = function () {\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n var rand = Math.floor(Math.random()*arr.length);\n Clyde.nextDirection = arr[rand];\n}\n\n/* ========== 追逐模式下的 AI ========== */\nBlinky.chaseAI = function () {\n redTarget.moveTo(player);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.chaseAI = function () {\n pinkTarget.moveTo(player);\n pinkTarget.direction = player.direction;\n pinkTarget.stepForward(14*4);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.chaseAI = function () {\n blueTarget.moveTo(player);\n blueTarget.direction = player.direction;\n blueTarget.stepForward(14*4);\n blueTarget.toward(Blinky);\n var d = blueTarget.distanceTo(Blinky);\n blueTarget.stepForward(-d);\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.chaseAI = function () {\n if (Clyde.distanceTo(player) \u003e 8*15) {\n orangeTarget.moveTo(player);\n } else {\n orangeTarget.moveTo(0, 15*33);\n }\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\n/* ========== 巡邏模式下的 AI ========== */\nBlinky.scatterAI = function () {\n redTarget.moveTo(117, 15);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.scatterAI = function () {\n pinkTarget.moveTo(522, 15);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.scatterAI = function () {\n blueTarget.moveTo(117, 465);\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.scatterAI = function () {\n orangeTarget.moveTo(522, 465);\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\n/* ========== 返回鬼屋模式的 AI ========== */\nBlinky.backToHouseAI = function () {\n redTarget.moveTo(320, 240);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.backToHouseAI = function () {\n pinkTarget.moveTo(320, 240);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.backToHouseAI = function () {\n blueTarget.moveTo(320, 240);\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.backToHouseAI = function () {\n orangeTarget.moveTo(320, 240);\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\nfunction closest(arr, target) {\n arr.sort(function (a, b) {\n var a = Math.abs(target - a);\n var b = Math.abs(target - b);\n if (a \u003e 180) a = 360 - a;\n if (b \u003e 180) b = 360 - b;\n return a - b;\n });\n return arr[0];\n}\n\nfunction getDirections(x, y, direction) {\n var arr = [];\n if (map[y - 1][x] == ' ' \u0026\u0026 direction != 180) arr.push(0);\n if (map[y][x + 1] == ' ' \u0026\u0026 direction != 270) arr.push(90);\n if (map[y + 1][x] == ' ' \u0026\u0026 direction != 0) arr.push(180);\n if (map[y][x - 1] == ' ' \u0026\u0026 direction != 90) arr.push(270);\n return arr;\n}","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":113,"hashid":"meyswzgg8","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6023113,"file_name":"b5.png","project_id":298676,"asset_id":418234,"created_at":"2021-09-23T17:58:08.261+08:00","updated_at":"2021-09-23T17:58:08.261+08:00"},{"id":6023114,"file_name":"b6.png","project_id":298676,"asset_id":418235,"created_at":"2021-09-23T17:58:08.265+08:00","updated_at":"2021-09-23T17:58:08.265+08:00"},{"id":6023115,"file_name":"b7.png","project_id":298676,"asset_id":418236,"created_at":"2021-09-23T17:58:08.269+08:00","updated_at":"2021-09-23T17:58:08.269+08:00"},{"id":6023116,"file_name":"b8.png","project_id":298676,"asset_id":418237,"created_at":"2021-09-23T17:58:08.273+08:00","updated_at":"2021-09-23T17:58:08.273+08:00"},{"id":6023117,"file_name":"b9.png","project_id":298676,"asset_id":418238,"created_at":"2021-09-23T17:58:08.277+08:00","updated_at":"2021-09-23T17:58:08.277+08:00"},{"id":6023118,"file_name":"b10.png","project_id":298676,"asset_id":418239,"created_at":"2021-09-23T17:58:08.281+08:00","updated_at":"2021-09-23T17:58:08.281+08:00"},{"id":6023119,"file_name":"b11.png","project_id":298676,"asset_id":418240,"created_at":"2021-09-23T17:58:08.285+08:00","updated_at":"2021-09-23T17:58:08.285+08:00"},{"id":6023120,"file_name":"b12.png","project_id":298676,"asset_id":418241,"created_at":"2021-09-23T17:58:08.289+08:00","updated_at":"2021-09-23T17:58:08.289+08:00"},{"id":6023121,"file_name":"f13.png","project_id":298676,"asset_id":418242,"created_at":"2021-09-23T17:58:08.293+08:00","updated_at":"2021-09-23T17:58:08.293+08:00"},{"id":6023122,"file_name":"f14.png","project_id":298676,"asset_id":418243,"created_at":"2021-09-23T17:58:08.297+08:00","updated_at":"2021-09-23T17:58:08.297+08:00"},{"id":6023123,"file_name":"o1.png","project_id":298676,"asset_id":418244,"created_at":"2021-09-23T17:58:08.301+08:00","updated_at":"2021-09-23T17:58:08.301+08:00"},{"id":6023124,"file_name":"o2.png","project_id":298676,"asset_id":418245,"created_at":"2021-09-23T17:58:08.305+08:00","updated_at":"2021-09-23T17:58:08.305+08:00"},{"id":6023125,"file_name":"o3.png","project_id":298676,"asset_id":418246,"created_at":"2021-09-23T17:58:08.309+08:00","updated_at":"2021-09-23T17:58:08.309+08:00"},{"id":6023126,"file_name":"o4.png","project_id":298676,"asset_id":418247,"created_at":"2021-09-23T17:58:08.314+08:00","updated_at":"2021-09-23T17:58:08.314+08:00"},{"id":6023127,"file_name":"o5.png","project_id":298676,"asset_id":418248,"created_at":"2021-09-23T17:58:08.318+08:00","updated_at":"2021-09-23T17:58:08.318+08:00"},{"id":6023128,"file_name":"o6.png","project_id":298676,"asset_id":418249,"created_at":"2021-09-23T17:58:08.321+08:00","updated_at":"2021-09-23T17:58:08.321+08:00"},{"id":6023129,"file_name":"o7.png","project_id":298676,"asset_id":418250,"created_at":"2021-09-23T17:58:08.325+08:00","updated_at":"2021-09-23T17:58:08.325+08:00"},{"id":6023130,"file_name":"o8.png","project_id":298676,"asset_id":418251,"created_at":"2021-09-23T17:58:08.329+08:00","updated_at":"2021-09-23T17:58:08.329+08:00"},{"id":6023131,"file_name":"p1.png","project_id":298676,"asset_id":418252,"created_at":"2021-09-23T17:58:08.334+08:00","updated_at":"2021-09-23T17:58:08.334+08:00"},{"id":6023132,"file_name":"p2.png","project_id":298676,"asset_id":418253,"created_at":"2021-09-23T17:58:08.338+08:00","updated_at":"2021-09-23T17:58:08.338+08:00"},{"id":6023133,"file_name":"p3.png","project_id":298676,"asset_id":418254,"created_at":"2021-09-23T17:58:08.342+08:00","updated_at":"2021-09-23T17:58:08.342+08:00"},{"id":6023134,"file_name":"p4.png","project_id":298676,"asset_id":418255,"created_at":"2021-09-23T17:58:08.346+08:00","updated_at":"2021-09-23T17:58:08.346+08:00"},{"id":6023135,"file_name":"p5.png","project_id":298676,"asset_id":418256,"created_at":"2021-09-23T17:58:08.350+08:00","updated_at":"2021-09-23T17:58:08.350+08:00"},{"id":6023136,"file_name":"p6.png","project_id":298676,"asset_id":418257,"created_at":"2021-09-23T17:58:08.355+08:00","updated_at":"2021-09-23T17:58:08.355+08:00"},{"id":6023137,"file_name":"p7.png","project_id":298676,"asset_id":418258,"created_at":"2021-09-23T17:58:08.359+08:00","updated_at":"2021-09-23T17:58:08.359+08:00"},{"id":6023138,"file_name":"p8.png","project_id":298676,"asset_id":418259,"created_at":"2021-09-23T17:58:08.363+08:00","updated_at":"2021-09-23T17:58:08.363+08:00"},{"id":6023139,"file_name":"p9.png","project_id":298676,"asset_id":418260,"created_at":"2021-09-23T17:58:08.367+08:00","updated_at":"2021-09-23T17:58:08.367+08:00"},{"id":6023140,"file_name":"p10.png","project_id":298676,"asset_id":418261,"created_at":"2021-09-23T17:58:08.371+08:00","updated_at":"2021-09-23T17:58:08.371+08:00"},{"id":6023141,"file_name":"p11.png","project_id":298676,"asset_id":418262,"created_at":"2021-09-23T17:58:08.375+08:00","updated_at":"2021-09-23T17:58:08.375+08:00"},{"id":6023142,"file_name":"p12.png","project_id":298676,"asset_id":418263,"created_at":"2021-09-23T17:58:08.380+08:00","updated_at":"2021-09-23T17:58:08.380+08:00"},{"id":6023143,"file_name":"r11.png","project_id":298676,"asset_id":418264,"created_at":"2021-09-23T17:58:08.384+08:00","updated_at":"2021-09-23T17:58:08.384+08:00"},{"id":6023144,"file_name":"r12.png","project_id":298676,"asset_id":418265,"created_at":"2021-09-23T17:58:08.401+08:00","updated_at":"2021-09-23T17:58:08.401+08:00"},{"id":6023145,"file_name":"r10.png","project_id":298676,"asset_id":418266,"created_at":"2021-09-23T17:58:08.405+08:00","updated_at":"2021-09-23T17:58:08.405+08:00"},{"id":6023146,"file_name":"r9.png","project_id":298676,"asset_id":418267,"created_at":"2021-09-23T17:58:08.409+08:00","updated_at":"2021-09-23T17:58:08.409+08:00"},{"id":6023147,"file_name":"r1.png","project_id":298676,"asset_id":418268,"created_at":"2021-09-23T17:58:08.413+08:00","updated_at":"2021-09-23T17:58:08.413+08:00"},{"id":6023148,"file_name":"r2.png","project_id":298676,"asset_id":418269,"created_at":"2021-09-23T17:58:08.417+08:00","updated_at":"2021-09-23T17:58:08.417+08:00"},{"id":6023149,"file_name":"r3.png","project_id":298676,"asset_id":418270,"created_at":"2021-09-23T17:58:08.421+08:00","updated_at":"2021-09-23T17:58:08.421+08:00"},{"id":6023150,"file_name":"r4.png","project_id":298676,"asset_id":418271,"created_at":"2021-09-23T17:58:08.425+08:00","updated_at":"2021-09-23T17:58:08.425+08:00"},{"id":6023151,"file_name":"r5.png","project_id":298676,"asset_id":418272,"created_at":"2021-09-23T17:58:08.429+08:00","updated_at":"2021-09-23T17:58:08.429+08:00"},{"id":6023152,"file_name":"r6.png","project_id":298676,"asset_id":418273,"created_at":"2021-09-23T17:58:08.433+08:00","updated_at":"2021-09-23T17:58:08.433+08:00"},{"id":6023153,"file_name":"r7.png","project_id":298676,"asset_id":418274,"created_at":"2021-09-23T17:58:08.437+08:00","updated_at":"2021-09-23T17:58:08.437+08:00"},{"id":6023154,"file_name":"r8.png","project_id":298676,"asset_id":418275,"created_at":"2021-09-23T17:58:08.441+08:00","updated_at":"2021-09-23T17:58:08.441+08:00"},{"id":6023155,"file_name":"o10.png","project_id":298676,"asset_id":418276,"created_at":"2021-09-23T17:58:08.445+08:00","updated_at":"2021-09-23T17:58:08.445+08:00"},{"id":6023156,"file_name":"o11.png","project_id":298676,"asset_id":418277,"created_at":"2021-09-23T17:58:08.449+08:00","updated_at":"2021-09-23T17:58:08.449+08:00"},{"id":6023157,"file_name":"o12.png","project_id":298676,"asset_id":418278,"created_at":"2021-09-23T17:58:08.453+08:00","updated_at":"2021-09-23T17:58:08.453+08:00"},{"id":6023158,"file_name":"o9.png","project_id":298676,"asset_id":418279,"created_at":"2021-09-23T17:58:08.457+08:00","updated_at":"2021-09-23T17:58:08.457+08:00"},{"id":6023101,"file_name":"empty.png","project_id":298676,"asset_id":418222,"created_at":"2021-09-23T17:58:08.201+08:00","updated_at":"2021-09-23T17:58:08.201+08:00"},{"id":6023102,"file_name":"block_1.png","project_id":298676,"asset_id":418223,"created_at":"2021-09-23T17:58:08.209+08:00","updated_at":"2021-09-23T17:58:08.209+08:00"},{"id":6023103,"file_name":"block_2.png","project_id":298676,"asset_id":418224,"created_at":"2021-09-23T17:58:08.212+08:00","updated_at":"2021-09-23T17:58:08.212+08:00"},{"id":6023104,"file_name":"food.png","project_id":298676,"asset_id":418225,"created_at":"2021-09-23T17:58:08.216+08:00","updated_at":"2021-09-23T17:58:08.216+08:00"},{"id":6023093,"file_name":"player_7.png","project_id":298676,"asset_id":418214,"created_at":"2021-09-23T17:58:08.164+08:00","updated_at":"2021-09-23T17:58:08.164+08:00"},{"id":6023094,"file_name":"player_5.png","project_id":298676,"asset_id":418215,"created_at":"2021-09-23T17:58:08.168+08:00","updated_at":"2021-09-23T17:58:08.168+08:00"},{"id":6023095,"file_name":"player_6.png","project_id":298676,"asset_id":418216,"created_at":"2021-09-23T17:58:08.172+08:00","updated_at":"2021-09-23T17:58:08.172+08:00"},{"id":6023096,"file_name":"player_8.png","project_id":298676,"asset_id":418217,"created_at":"2021-09-23T17:58:08.176+08:00","updated_at":"2021-09-23T17:58:08.176+08:00"},{"id":6023097,"file_name":"player_3.png","project_id":298676,"asset_id":418218,"created_at":"2021-09-23T17:58:08.180+08:00","updated_at":"2021-09-23T17:58:08.180+08:00"},{"id":6023098,"file_name":"player_1.png","project_id":298676,"asset_id":418219,"created_at":"2021-09-23T17:58:08.183+08:00","updated_at":"2021-09-23T17:58:08.183+08:00"},{"id":6023099,"file_name":"player_4.png","project_id":298676,"asset_id":418220,"created_at":"2021-09-23T17:58:08.188+08:00","updated_at":"2021-09-23T17:58:08.188+08:00"},{"id":6023100,"file_name":"player.png","project_id":298676,"asset_id":418221,"created_at":"2021-09-23T17:58:08.191+08:00","updated_at":"2021-09-23T17:58:08.191+08:00"},{"id":6023105,"file_name":"red_target.png","project_id":298676,"asset_id":418226,"created_at":"2021-09-23T17:58:08.220+08:00","updated_at":"2021-09-23T17:58:08.220+08:00"},{"id":6023106,"file_name":"orange_target.png","project_id":298676,"asset_id":418227,"created_at":"2021-09-23T17:58:08.224+08:00","updated_at":"2021-09-23T17:58:08.224+08:00"},{"id":6023107,"file_name":"pink.png","project_id":298676,"asset_id":418228,"created_at":"2021-09-23T17:58:08.228+08:00","updated_at":"2021-09-23T17:58:08.228+08:00"},{"id":6023108,"file_name":"blue_target.png","project_id":298676,"asset_id":418229,"created_at":"2021-09-23T17:58:08.232+08:00","updated_at":"2021-09-23T17:58:08.232+08:00"},{"id":6023109,"file_name":"b1.png","project_id":298676,"asset_id":418230,"created_at":"2021-09-23T17:58:08.236+08:00","updated_at":"2021-09-23T17:58:08.236+08:00"},{"id":6023110,"file_name":"b2.png","project_id":298676,"asset_id":418231,"created_at":"2021-09-23T17:58:08.240+08:00","updated_at":"2021-09-23T17:58:08.240+08:00"},{"id":6023111,"file_name":"b3.png","project_id":298676,"asset_id":418232,"created_at":"2021-09-23T17:58:08.244+08:00","updated_at":"2021-09-23T17:58:08.244+08:00"},{"id":6023112,"file_name":"b4.png","project_id":298676,"asset_id":418233,"created_at":"2021-09-23T17:58:08.257+08:00","updated_at":"2021-09-23T17:58:08.257+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦