#include <psychlops.h>
using namespace Psychlops;

double width=100,height=100;
double temp1,temp2,temp3,temp4;
Psychlops::Rectangle rect1(width,height);
Psychlops::Color col;
Psychlops::Image Noise1(rect1,Image::RGBA);

void psychlops_main() {

	Canvas sampleA(Canvas::fullscreen);
	Noise1.centering();
	for(int x=0; x<width; x++){
		for(int y=0; y<height; y++){
			//R,G,B,Aそれぞれに0〜1の値をランダムに返します
			temp1=Psychlops::random();
			temp2=Psychlops::random();
			temp3=Psychlops::random();
			temp4=Psychlops::random();
			col.set(temp1,temp2,temp3,temp4);
			Noise1.pix(x,y,col);
		}
	}
	Noise1.draw();
	sampleA.flip();
	while(!Input::get(Keyboard::spc));
}