laydomino.c
int *domino_layout(int w, int h, random_state *rs)
{
    int *grid, *grid2, *list;
    int wh = w*h;

    /*
     * Allocate space in which to lay the grid out.
     */
    grid = snewn(wh, int);
    grid2 = snewn(wh, int);
    list = snewn(2*wh, int);

    domino_layout_prealloc(w, h, rs, grid, grid2, list);

    sfree(grid2);
    sfree(list);

    return grid;
}
/*
 * This function returns an array size w x h representing a grid:
 * each grid[i] = j, where j is the other end of a 2x1 domino.
 * If w*h is odd, one square will remain referring to itself.
 */
This function returns an array size w x h representing a grid:
each grid[i] = j, where j is the other end of a 2x1 domino.
If w*h is odd, one square will remain referring to itself.
This function returns an array size w x h representing a grid : each grid [ i ] = j where j is the other end of a 2x1 domino . If w * h is odd one square will remain referring to itself .
int *domino_layout(int w, int h, random_state *rs)
{
    int *grid, *grid2, *list;
    int wh = w*h;
    grid = snewn(wh, int);
    grid2 = snewn(wh, int);
    list = snewn(2*wh, int);
    domino_layout_prealloc(w, h, rs, grid, grid2, list);
    sfree(grid2);
    sfree(list);
    return grid;
}
int * domino_layout ( int w , int h , random_state * rs ) { int * grid , * grid2 , * list ; int wh = w * h ; grid = snewn ( wh , int ) ; grid2 = snewn ( wh , int ) ; list = snewn ( 2 * wh , int ) ; domino_layout_prealloc ( w , h , rs , grid , grid2 , list ) ; sfree ( grid2 ) ; sfree ( list ) ; return grid ; }
This function returns an array size w x h representing a grid:
 each grid[i] = j, where j is the other end of a 2x1 domino.
This function returns an array size w x h representing a grid : each grid [ i ] = j where j is the other end of a 2x1 domino .
/*
     * Allocate space in which to lay the grid out.
     */