Sha256: 1bf91c0d735bc3094e80a1973a005eb9363b9de14160de23aca30e6f02a2fd37
Contents?: true
Size: 869 Bytes
Versions: 8
Compression:
Stored size: 869 Bytes
Contents
/* * chess - a fast library to play chess in Ruby * * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it> * This code is under LICENSE LGPLv3 */ #ifndef GAME_H #define GAME_H #define NEW_GAME (Game*) malloc (sizeof (Game)) #define BUFFER_SIZE 1024 #include "common.h" #include "board.h" typedef struct { Board* boards[BUFFER_SIZE]; char* moves[BUFFER_SIZE]; char* full_moves[BUFFER_SIZE]; int current; unsigned short result; } Game; #include "special.h" void init_chess_library (); Game* init_game (); void free_game (Game *g); Board* current_board (Game *g); Board* get_board (Game *g, int index); char* current_move (Game *g); char* current_full_move (Game *g); bool apply_move (Game *g, int from, int to, char promote_in); void rollback (Game *g); bool threefold_repetition (Game *g); void set_fen (Game *g, const char *fen); #endif
Version data entries
8 entries across 8 versions & 1 rubygems
Version | Path |
---|---|
chess-0.0.9 | ext/game.h |
chess-0.0.8 | ext/game.h |
chess-0.0.6 | ext/game.h |
chess-0.0.5 | ext/game.h |
chess-0.0.4 | ext/game.h |
chess-0.0.3 | ext/game.h |
chess-0.0.2 | ext/game.h |
chess-0.0.1 | ext/game.h |