Sha256: c652be7c71b63db209aab99f32b24a0939f9e805fc335aba25938f6b9a8473ee
Contents?: true
Size: 869 Bytes
Versions: 4
Compression:
Stored size: 869 Bytes
Contents
/* * chess - a fast library to play chess in Ruby * * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com> * 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* coord_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_coord_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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chess-0.2.1 | ext/game.h |
chess-0.2.0 | ext/game.h |
chess-0.1.4 | ext/game.h |
chess-0.1.3 | ext/game.h |