From ecd86e1a263a543e395d9e145294103c0fbb7230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Fri, 27 Mar 2015 12:54:30 -0300 Subject: setup pieces --- lib/piece.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/piece.c') diff --git a/lib/piece.c b/lib/piece.c index bbe0bdc..091d0a5 100644 --- a/lib/piece.c +++ b/lib/piece.c @@ -1,4 +1,6 @@ #include +#include + #include "piece.h" #ifdef UTF8 @@ -51,3 +53,10 @@ int piece_character(Piece p) { } #endif + +Piece* new_piece(Color c, PieceType t) { + Piece* p = malloc(sizeof(Piece)); + p->color = c; p->type = t; + + return p; +} -- cgit v1.2.3