Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*!
- ** This file has been generated, if you wish to
- ** modify it in a permanent way, please refer
- ** to the script file : gen/generator_c.rb
- */
- #pragma once
- #include <stdlib.h>
- #include <stdbool.h>
- /*!
- ** All possible error types that can be returned by action functions
- */
- typedef enum error {
- OK, /* <- no error occurred */
- OUT_OF_BOUNDS, /* <- provided position is out of bounds */
- ALREADY_OCCUPIED, /* <- someone already played at the provided position */
- ALREADY_PLAYED, /* <- you already played this turn, you cheater! */
- } error;
- struct position;
- typedef struct int_array {
- int* datas;
- size_t length;
- } int_array;
- /*!
- ** Position on the TicTacToe board
- */
- typedef struct position {
- int x; /* <- X coordinate */
- int y; /* <- Y coordinate */
- } position;
- /*!
- ** Play at the given position
- */
- error play(position pos);
- /*!
- ** Returns your team number
- */
- int my_team(void);
- /*!
- ** Returns the TicTacToe board
- */
- int_array board(void);
- /*!
- ** Cancels the last played action
- */
- bool cancel(void);
- /*!
- ** Affiche le contenu d'une valeur de type error
- */
- void afficher_error(error v);
- /*!
- ** Affiche le contenu d'une valeur de type position
- */
- void afficher_position(position v);
- /*!
- ** Function called at the start of the game
- */
- void init_game(void);
- /*!
- ** Called when this is your turn to play
- */
- void play_turn(void);
- /*!
- ** Function called at the end of the game
- */
- void end_game(void);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement