Warning: session_start(): open(/var/lib/php/sessions/sess_oosg21oaf9fqcposa3u0hjrf6c, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static int points;
static ImageSurface is;
static int w = 500, h = 500;
static int rw = 50, rh = 50, border = 10;
static int x1, y1;
p-substance {
nextImage();
}
svoid nextImage {
RGBImage img = rgbImage(Color.white, w, h);
x1 = random(border, w-rw-border);
y1 = random(border, h-rh-border);
rgbFillRect(img, x1, y1, rw, rh, Color.red);
bool first = is == null;
is = showImage(is, img);
if (first) {
onLeftClick(is, voidfunc(Pt p) {
if (new Rect(x1, y1, rw, rh).contains(p)) {
++points;
print("Points: " + points);
nextImage();
}
});
disableImageSurfaceSelector(is);
}
}