summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/board.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/board.c b/lib/board.c
index 6685b3b..134cfa8 100644
--- a/lib/board.c
+++ b/lib/board.c
@@ -4,7 +4,7 @@
#include "board.h"
#include "piece.h"
-Board _setup_colors(Board b) {
+static Board _setup_colors(Board b) {
short i, j;
for (i = 0; i < SIZE; i++)
@@ -23,7 +23,7 @@ Board _setup_colors(Board b) {
return b;
}
-Board _pawns(Board b) {
+static Board _pawns(Board b) {
short white_pawns_row = 1, black_pawns_row = 6, i;
for (i = 0; i < SIZE; i++)
@@ -35,7 +35,7 @@ Board _pawns(Board b) {
return b;
}
-Board _rocks(Board b) {
+static Board _rocks(Board b) {
b[0][0].piece = new_piece(WHITE, ROCK);
b[0][7].piece = new_piece(WHITE, ROCK);
b[7][0].piece = new_piece(BLACK, ROCK);
@@ -44,7 +44,7 @@ Board _rocks(Board b) {
return b;
}
-Board _knights(Board b) {
+static Board _knights(Board b) {
b[0][1].piece = new_piece(WHITE, KNIGHT);
b[0][6].piece = new_piece(WHITE, KNIGHT);
b[7][1].piece = new_piece(BLACK, KNIGHT);
@@ -53,7 +53,7 @@ Board _knights(Board b) {
return b;
}
-Board _bishops(Board b) {
+static Board _bishops(Board b) {
b[0][2].piece = new_piece(WHITE, BISHOP);
b[0][5].piece = new_piece(WHITE, BISHOP);
b[7][2].piece = new_piece(BLACK, BISHOP);
@@ -62,25 +62,25 @@ Board _bishops(Board b) {
return b;
}
-Board _queens(Board b) {
+static Board _queens(Board b) {
b[0][4].piece = new_piece(WHITE, QUEEN);
b[7][4].piece = new_piece(BLACK, QUEEN);
return b;
}
-Board _kings(Board b) {
+static Board _kings(Board b) {
b[0][3].piece = new_piece(WHITE, KING);
b[7][3].piece = new_piece(BLACK, KING);
return b;
}
-Board _setup_pieces(Board b) {
+static Board _setup_pieces(Board b) {
return _pawns(_rocks(_knights(_bishops(_queens(_kings(b)))))); // :-)
}
-Board _initial_setup(Board b) {
+static Board _initial_setup(Board b) {
return _setup_pieces(_setup_colors(b));
}
nihil fit ex nihilo