- if(x>0) edge_new(&g->nodes[t], &g->nodes[t-1], R, R);
- if(x<width-1) edge_new(&g->nodes[t], &g->nodes[t+1], R, R);
- if(y>0) edge_new(&g->nodes[t], &g->nodes[t-width], R, R);
- if(y<width-1) edge_new(&g->nodes[t], &g->nodes[t+width], R, R);
+ if(x>0) graph_add_edge(&g->nodes[t], &g->nodes[t-1], R, R);
+ if(x<width-1) graph_add_edge(&g->nodes[t], &g->nodes[t+1], R, R);
+ if(y>0) graph_add_edge(&g->nodes[t], &g->nodes[t-width], R, R);
+ if(y<width-1) graph_add_edge(&g->nodes[t], &g->nodes[t+width], R, R);