You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
1.1 KiB

#define start_pos startPos
#define end_pos endPos
#define debug
#define allow_returning_to_first_position_in_a_round 1
#define allow_to_block_opposite_player 0
#include "api.h"
enum bool {false, true};
enum validation_movement_t {neighbour_valid, jump, jump_valid, invalid};
enum direction_t { left, right, up_left, up_right, down_left, down_right };
struct player_t {
char name[50];
enum hole_t branch;
unsigned int error;
void *ia_lib_p; /* NULL si le joueur n'est pas une stratégie */
};
/* pour associer une branche de l'étoile à un joueur */
enum hole_t star_branch(const unsigned int nb_player, const size_t index);
/* vérifie que le mouvement est valide */
enum validation_movement_t valid_move(const int start_pos_first_move, const struct move_t move, const struct move_t previous_move, const struct player_t player, const struct game_state_t game, const size_t start_position[6][10], const enum bool last_move);
/* vérifie si le joueur a gagné */
enum bool winner(const struct player_t player, const size_t start_position[6][10], const struct game_state_t game);