1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include "square.h" Color square_get_color(Square s) { return s.color; } Piece* square_get_piece(Square s) { return s.piece; } Square square_set_color(Square s, Color c) { s.color = c; return s; } Square square_set_piece(Square s, Piece* p) { s.piece = p; return s; }