Black&White Game of Life with SDL

sim.h 362B

12345678910111213141516171819202122232425
  1. //
  2. // sim.h
  3. // Life
  4. //
  5. // Created by Benoit Sida on 2014-06-13.
  6. // Copyright (c) 2014 Benoit Sida. All rights reserved.
  7. //
  8. #ifndef Life_sim_h
  9. #define Life_sim_h
  10. void sim(SDL_Window *ecran, SDL_Surface *screen, int cycles);
  11. enum {CELL, ALIVE, DEAD};
  12. typedef struct Cell Cell;
  13. struct Cell
  14. {
  15. int x;
  16. int y;
  17. int type;
  18. int voisines;
  19. };
  20. #endif