(School exercise) Game of life in Java