Skip to content

Commit 08519bf

Browse files
authored
Update tcs.html
1 parent c51e2d3 commit 08519bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

game/tcs.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@
5252
// 绘制蛇
5353
ctx.fillStyle = '#4CAF50';
5454
snake.forEach(segment => ctx.fillRect(segment.x, segment.y, 18, 18));
55+
snake.forEach(segment => ctx.fillRect2(segment.x, segment.y, 18, 18));
5556
// 绘制食物
5657
ctx.fillStyle = '#FF0000';
5758
ctx.fillRect(food.x, food.y, 18, 18);
58-
ctx.fillRect(food.y, food.x, 9, 9);
59+
ctx.fillRect2(food.y, food.x, 18, 18);
5960
}
6061

6162
// 移动蛇:ml-citation{ref="4,7" data="citationList"}

0 commit comments

Comments
 (0)