snake: remove dealt with comments
This commit is contained in:
parent
e37d737d3a
commit
9dea6014fe
@ -60,7 +60,6 @@ class SnakeCore {
|
|||||||
foodAte: boolean;
|
foodAte: boolean;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// TODO: Add CSS stuff for page
|
|
||||||
this.canvas = document.getElementById('snake') as HTMLCanvasElement;
|
this.canvas = document.getElementById('snake') as HTMLCanvasElement;
|
||||||
this.context = this.canvas.getContext('2d') as CanvasRenderingContext2D;
|
this.context = this.canvas.getContext('2d') as CanvasRenderingContext2D;
|
||||||
this.grid = 25; // size of grid squares
|
this.grid = 25; // size of grid squares
|
||||||
@ -213,7 +212,6 @@ class Bot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix trim function
|
|
||||||
trim() {
|
trim() {
|
||||||
let reachedSnake = false;
|
let reachedSnake = false;
|
||||||
this.path.push(this.pathUntrimmed.pop() as Point); // Push food location
|
this.path.push(this.pathUntrimmed.pop() as Point); // Push food location
|
||||||
@ -240,13 +238,6 @@ class Bot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
values:
|
|
||||||
0 = left
|
|
||||||
1 = up
|
|
||||||
2 = right
|
|
||||||
4 = down
|
|
||||||
*/
|
|
||||||
nextMove() {
|
nextMove() {
|
||||||
// Get new path to food
|
// Get new path to food
|
||||||
if (this.path.length === 0)
|
if (this.path.length === 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user