maitretarot-devel-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maitretarot-devel-fr] Je l'ai retrouvé !!


From: nico
Subject: [Maitretarot-devel-fr] Je l'ai retrouvé !!
Date: Mon, 27 May 2002 21:37:05 +0200

Merci à 
find ~ -mtime -19 -mtime +15 -exec ls -l {} \;
pour sa participation.

Orthographe non garantie.

nicO
IA API description

You should use the following callback fonctions.

player_client_init(player_t * player)
player_client_game_init(player_t * player)
player_client_make_bid(player_t * player)
player_client_make_chien(player_t * player)
player_client_choose_cardplayer_t * player)

The data exchanged :

typedef struct
{
  net_t net;

  gint place;

  GString * nick[MAX_PLAYER];

  gint bid[MAX_PLAYER];
  gint chien[MAX_CARD_CHIEN];
  gint card[MAX_HAND_CARD];

  gint turn[MAX_PLAYER];
  gint previous_turn[MAX_PLAYER];
  gint card_play;

  gpointer client_private_data;
}
player_t;

If the data is not still set the value is -1.

init
 is called at the very beginning of the programme to set the name of the ia and 
to initiate some internal data structure.
(setting of nick and client_private_data)

game_init
is called just after receiving the card. this array are then no more touch by 
the api. It's up to the user to manage it.
( reading of card if we want to compute some sort)

make_bid
this fonction is called when it's the turn to bet. 
(read bid then you put you're bid at the place of the first -1 ) 

make_chien (make_dog sounded to much stupid)
if the client win the bet this fonction is called.
you should manage chien and card. 

choose_card 
is used every time its the time to the client to play.
previous_turn give you the result of the previous turn (number of falling card, 
turn give the falling card of the current turn, the card play are set)

?? Turn could'nt be used as bid ?
?? where place work : is the order of the array those from place or the turn 
order.
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]