void main() { print( "Hello, world!" ); }
int twice( int x ) { return x * 2; }
class Game { int width; int left; Game( int w, int l ) { width = w; left = l; } }
for ( int i = 1; i < snake.length; ++i ) { if ( snake[i] == head ) { dead = true; } }
switch( e.keyCode ) { case KeyCode.UP: nextDir = Dir.up; break; // ...
snake = new List<Point>();
void main() { var x = 3; for ( int i = 0; i < 10; ++i ) { var x = 5; // ... } print( x ); // prints 3 }
class Game { int width; int left; Game( this.width, this.left ) {} get int right => return left + width; set right( int val ) => width = val - left; }
Patreon! | patreon.com/andybalaam |
---|---|
Videos | youtube.com/user/ajbalaam |
@andybalaam | |
Blog | artificialworlds.net/blog |
Projects | artificialworlds.net |