Plague-fx/src/epidemic_engine.h

21 lines
660 B
C
Raw Normal View History

2021-05-30 21:33:32 +02:00
#ifndef _EPIDEMIC_ENGINE_H
#define _EPIDEMIC_ENGINE_H
2021-06-01 11:36:26 +02:00
#include "core.h"
2021-06-01 11:36:26 +02:00
// humans per case of the epidemic grid
#define HUMANS_PER_CASE 1000000
2021-05-30 21:33:32 +02:00
// can_become_infected : return 0 if the case (i, j) isn't infectable, 1 else
2021-06-01 14:58:37 +02:00
bool can_become_infected(const struct grid epidemic_grid, const int mutations_selected[3], const int i, const int j);
2021-06-01 11:36:26 +02:00
// bernoulli : simulate a random event
2021-06-02 21:15:15 +02:00
bool bernoulli(const int p);
2021-05-30 21:33:32 +02:00
// epidemic_simulation : simulate the propagation of the virus
void epidemic_simulation(struct game *current_game);
// init_tab : copy src into dest (for int)
void init_tab(int x, uint8_t dest[x], uint8_t src[x]);
2021-05-30 21:33:32 +02:00
#endif /* _EPIDEMIC_ENGINE_H */