We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How do I type the function I have so that it is called in setup?
//this is my set up
void setup() {
size(362,362);
cell(x_global, y_global, s_global, color(255));
triple(x_global,y_global, s_global, color(255));
block(x_global,y_global, s_global, color(255));
row(x_global,y_global, s_global, color(255));
cellarray(x_global,y_global, s_global, color(255));
board();
drawLines();
}
//I want to call both in set up
void board() {
cellarray(x_global, y_global, s_global);
drawLines();
}
void draw() {
if (mousePressed) {
fill(255, 0, 0);
ellipse(x_global+s_global*cell_x+s_global/2,
y_global+s_global*cell_y+s_global/2,
s_global/4, s_global/4);
}
Answers
Could you please repost your code, highlight it, then hit CTRL+K to format it? :-O
Still code format is a mess. Even before posting, inside Processing's IDE, hit CTRL+T there to make code neat!
That's what I did for you this time:
I don't understand the question, the board() function is already called in setup().