Dart Documentationsnake

snake library

Properties

CanvasRenderingContext2D ctx #

CanvasRenderingContext2D ctx = (query("#canvas") as CanvasElement).context2D

const int HEIGHT #

const int HEIGHT = 400

const int WIDTH #

const int WIDTH = 600

Functions

void main() #

void main() {
 var x = WIDTH/2;
 var y = HEIGHT/2;
 Snake snake = new Snake(x, y, 5, 1);
 snake.init();
}

Classes