diff --git a/battleships.c b/battleships.c index 29bdedf..bd0d788 100644 --- a/battleships.c +++ b/battleships.c @@ -2,6 +2,7 @@ #include #include #include +#include enum { BOARD_SIZE = 10, @@ -60,6 +61,8 @@ enum target { enum target check_hit(struct state state, struct position hit); int main(void) { + srand(time(NULL)); + struct state state = generate_state(); while (!state.game_over) {