C Game of life with ncurses