summaryrefslogtreecommitdiff
path: root/lib/move.c
blob: 74a8eae54a4d2feabcbd2922178c89c78d3a20ab (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 "move.h"


/*
 * Initialize a Move
 */
Move move_init(Coord orig, Coord dest) {
    Move m;

    m.orig = orig;
    m.dest = dest;

    return m;
}

Coord move_get_orig(Move m) {
    return m.orig;
}

Coord move_get_dest(Move m) {
    return m.dest;
}

/*
 * Returns 1 if Move is a valid chess movement.
 */
int move_is_valid(Move m) {
    return 1;
} 
nihil fit ex nihilo