Generation

generate functionMon, 05 Jun 2023

create a code which is a memory game in which the cards are figures of the ASCII code, you can move between cards with the arrow keys

void setup() { size(500, 500); background(255); textSize(30); fill(0); } void draw() { background(255); text(key, width/2, height/2); if (keyCode == LEFT) { text(key-1, width/2, height/2); } if (keyCode == RIGHT) { text(key+1, width/2, height/2); } }

Questions about programming?Chat with your personal AI assistant