#include "GameBoy.h"
GameBoy gb;
int pointX = 5;
int pointY = 5;
int tail[8*16][2];
int tailLong = 0;
void setup() {
gb.begin(0);
for(int x=0;x<8;x++)for(int y=0;y<16;y++)
{gb.drawPoint(x, y); delay(10);}
}
// Приклад використання:
void loop() {
gb.clearDisplay();
for(int i=0;i<tailLong;i++)
{ gb.drawPoint(tail[i][0], tail[i][1]);}
gb.drawPoint(pointX, pointY);
if(gb.getKey()==3 and pointY>0) pointY--;
if(gb.getKey()==6 and pointY<15) pointY++;
if(gb.getKey()==4 and pointX>0) pointX--;
if(gb.getKey()==5 and pointY<6) pointX++;
delay(100);
}