diff options
author | Raúl Benencia <rul@kalgan.cc> | 2015-03-31 16:33:20 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2015-03-31 16:33:20 -0300 |
commit | 30624a2bf3717e64a2134306a74d48463d8f14d4 (patch) | |
tree | 6fa0deb08a5f6c4f853b782ab6334ee203e65260 | |
parent | ce79ee81e7d4e41c83612748160c85c0b0effdcd (diff) |
rename new_piece to piece_new in order to follow general convention
-rw-r--r-- | include/piece.h | 2 | ||||
-rw-r--r-- | lib/board.c | 2 | ||||
-rw-r--r-- | lib/piece.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/piece.h b/include/piece.h index d499cf5..b0f8479 100644 --- a/include/piece.h +++ b/include/piece.h @@ -4,6 +4,6 @@ #include "types.h" int piece_character(Piece p); -Piece* new_piece(Color, PieceType); +Piece* piece_new(Color, PieceType); #endif diff --git a/lib/board.c b/lib/board.c index 499478a..a4a6c49 100644 --- a/lib/board.c +++ b/lib/board.c @@ -27,7 +27,7 @@ static Board _setup_colors(Board b) { static Board _set_new_piece(Board b, Coord c, Color color, PieceType t) { Square s = board_get_square(b, c); - s.piece = new_piece(color, t); + s.piece = piece_new(color, t); return board_set_square(b, c, s); } diff --git a/lib/piece.c b/lib/piece.c index 091d0a5..036a9a3 100644 --- a/lib/piece.c +++ b/lib/piece.c @@ -54,7 +54,7 @@ int piece_character(Piece p) { #endif -Piece* new_piece(Color c, PieceType t) { +Piece* piece_new(Color c, PieceType t) { Piece* p = malloc(sizeof(Piece)); p->color = c; p->type = t; |