summaryrefslogtreecommitdiffstats
path: root/kpat/freecell-solver/rand.c
blob: d5151e8ec97b5f723a5b39ffcd2aaa34ccc30e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdlib.h>

#ifdef DMALLOC
#include <dmalloc.h>
#endif

#include "rand.h"

fcs_rand_t * freecell_solver_rand_alloc(unsigned int seed)
{
    fcs_rand_t * ret;

    ret = malloc(sizeof(fcs_rand_t));
    ret->seed = (long)seed;

    return ret;
}

void freecell_solver_rand_free(fcs_rand_t * rand)
{
    free(rand);
}


void freecell_solver_rand_srand(fcs_rand_t * rand, unsigned int seed)
{
    rand->seed = seed;
}