rendered paste body#include "graphics.hpp"#include <math.h>#include <iostream>#include <vector>#include <stdlib.h>using namespace genv;using namespace std;struct koord{ int egyik, masik; };struct ho{ int x, y; vector<koord> k;void hopihe(int x, int y){ int a=(int)(rand() % 4 +4); gout << color(0,0,0) << move_to(0,0) << box_to(399,399)<< refresh; gout << color(255,255,255) << move_to(x-a+1,y-a+1) << line_to(x+a-1,y+a-1) << move_to(x-a,y) << line_to(x+a,y) << move_to(x,y-a)<< line_to(x,y+a) << move_to(x-a+1,y+a-1)<< line_to(x+a-1,y-a+1) << dot; gout << refresh; //k[1].egyik=x; //k[1].masik=y;}void novel(int d, int f){ k[1].egyik=d+1; k[1].masik=f+1; }void mozog(){ //if(k[1].egyik>0 && k[1].masik>0){ //novel(k[1].egyik,k[1].masik); //hopihe(k[1].egyik, k[1].masik); //} //hopihe(ew.pos_x,ew.pos_y); }};int main(){ gout.open(400,400); gin.timer(10); event ev; ho h; while (gin) { gin >> ev; if (ev.button==btn_left) { h.hopihe(ev.pos_x,ev.pos_y); } if(ev.type==ev_timer){ h.mozog(); } if (ev.keycode==key_escape) { return 0; }}}