b->dimensions.y = sizey;
b->tiles = malloc(sizet * sizeof(Tile));
- //for(int x = 0; x < sizex; ++x){
- // b->tiles[x] = malloc(sizey * sizeof(Tile));
- // for(int y = 0; y < sizey; ++y){
- // b->tiles[x][y] = tile_init(point3i(x,y,1), PLAINS);
- // }
- //}
for(int x = 0; x < sizex; ++x){
for(int y = 0; y < sizey; ++y){
- b->tiles[x + (y * sizey)] =
+ b->tiles[y * sizex + x] =
tile_init(point3i(x,y,1), PLAINS);
}
}
Point2i loc;
Tile* sel = NULL;
- for(int x = 0; x < 5; ++x){
- for(int y = 0; y < 3; ++y){
+ for(int y = 0; y < 3; ++y){
+ for(int x = 0; x < 5; ++x){
loc.x = x;
loc.y = y;
sel = board_tile_at(board, loc);
if(sel == NULL){
- printf("N");
+ printf("X");
} else {
printf("#");
}