diff options
Diffstat (limited to 'lib/input.c')
-rw-r--r-- | lib/input.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/input.c b/lib/input.c index 63df8c5..8b696e1 100644 --- a/lib/input.c +++ b/lib/input.c @@ -3,6 +3,7 @@ #include "coordinate.h" #include "input.h" +#include "move.h" #define LENGTH 80 @@ -25,14 +26,21 @@ static Coord _input_coord() { return coord_init(line); } -Coord input_orig_coord() { +static Coord _input_orig_coord() { printf("Orig coordinate: "); return _input_coord(); } -Coord input_dest_coord() { +static Coord _input_dest_coord() { printf("Dest coordinate: "); return _input_coord(); } + +Move input_move() { + Coord orig = _input_orig_coord(); + Coord dest = _input_dest_coord(); + + return move_init(orig, dest); +} |