Black&White Game of Life with SDL

12345678910111213141516171819202122232425262728
  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(Sprites *Sprites, SDL_Window *ecran, SDL_Surface *screen, int cycles);
  11. enum {CELL, ALIVE, DEAD};
  12. enum { TOP, RIGHT, LOW, LEFT};
  13. typedef struct Cell Cell;
  14. struct Cell
  15. {
  16. int x;
  17. int y;
  18. int type;
  19. int voisines;
  20. bool near[4];
  21. int clip;
  22. };
  23. #endif