simulation.h 1.81 KB
Newer Older
1
2
/* tarot implements the rules of the tarot game
 * Copyright (C) 2019  Vivien Kraus
Vivien Kraus's avatar
Vivien Kraus committed
3
 *
4
5
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, version 3 of the License.
Vivien Kraus's avatar
Vivien Kraus committed
7
8
9
10
11
12
13
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Vivien Kraus's avatar
Vivien Kraus committed
15
 */
16

Vivien Kraus's avatar
Vivien Kraus committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef H_TAROT_SIMULATION_INCLUDED
#define H_TAROT_SIMULATION_INCLUDED
#include <stddef.h>
#include <tarot/player.h>
#ifdef __cplusplus
extern "C"
{
#endif                          /* __cplusplus */

  struct yarrow256_ctx;
  struct TarotGame;

  typedef enum
  {
    TAROT_SIMULATION_OK,
    TAROT_SIMULATION_INVSEED
  } TarotSimulationError;

  /**
   * tarot_simulate:
Vivien Kraus's avatar
Vivien Kraus committed
37
   * @game: (type TarotGame):
Vivien Kraus's avatar
Vivien Kraus committed
38
39
   */
  TarotSimulationError tarot_simulate (struct yarrow256_ctx *prng,
40
                                       struct TarotGame *game);
Vivien Kraus's avatar
Vivien Kraus committed
41
42
43

  /**
   * tarot_simulate_random:
Vivien Kraus's avatar
Vivien Kraus committed
44
   * @game: (type TarotGame):
Vivien Kraus's avatar
Vivien Kraus committed
45
46
   */
  TarotSimulationError tarot_simulate_random (struct yarrow256_ctx *prng,
47
                                              struct TarotGame *game);
Vivien Kraus's avatar
Vivien Kraus committed
48
49
50

  /**
   * tarot_simulate_agreed:
Vivien Kraus's avatar
Vivien Kraus committed
51
   * @game: (type TarotGame):
Vivien Kraus's avatar
Vivien Kraus committed
52
53
   */
  TarotSimulationError tarot_simulate_agreed (struct yarrow256_ctx *prng,
Vivien Kraus's avatar
Vivien Kraus committed
54
                                              struct TarotGame *game);
Vivien Kraus's avatar
Vivien Kraus committed
55
56
57
58
59
60
61
62
63
64

#ifdef __cplusplus
}
#endif                          /* __cplusplus */

#endif                          /* not H_TAROT_SIMULATION_INCLUDED */

/* Local Variables: */
/* mode: c */
/* End: */