<commit_before>//Copyright (C) 2014-2015  <NAME>
#include "main.h"

int main(void){//no arguments to start
	printf("\n");//first character

	init();//initialise variables

	//place pieces for test
	place(1,1,BLACK);//black
	place(2,1,WHITE);//white

	printboard();//print out the board

	exit(EXIT_SUCCESS);//end of program
}

void printboard(void){//print out bord following the macros with space between each
	int i, j;
	printf("  ");//first 2 spaces
	for (i = 0; i < BOARD_SIZE; i++){//printf number for column
		printf("%2d", i + 1);//print number for column
	}
	printf("\n");//newline
	for (i = 0; i < BOARD_SIZE; i++){//each row
		printf("%2d ", i + 1);//print number for row
		for (j = 0; j < BOARD_SIZE; j++){//each position
			switch (board[i][j]){
			case BLACK://black
				printf(BLACK_PIECE);//print black
				break;
			case WHITE://white
				printf(WHITE_PIECE);//print white
				break;
			case STAR://spacial
				printf(STAR_POINT);//print white
				break;
			default://blank
				printf(BLANK_POINT);//blank piece
				break;
			}
		}
		printf("\n");//newline
	}


}



void init(void){//initialise variables
	memset(board, 0, BOARD_SIZE*BOARD_SIZE);//clear board
	//place / mark star points
	//4,4 points
	place(4, 4, STAR);
	place(4, 16, STAR);
	place(16, 4, STAR);
	place(16, 16, STAR);
	//4,10 points
	place(4, 10, STAR);
	place(10, 4, STAR);
	place(10, 16, STAR);
	place(16, 10, STAR);
	//10,10 points
	place(10, 10, STAR);
}


void place(unsigned char x, unsigned char y, unsigned char piece){//place a piece on board
	board[y - 1][x - 1] = piece;//set piece
}<commit_msg>Added star point checking<commit_after>//Copyright (C) 2014-2015  <NAME>
#include "main.h"

int main(void){//no arguments to start
	printf("\n");//first character

	init();//initialise variables

	//place pieces for test
	place(1,1,BLACK);//black
	place(2,1,WHITE);//white
	place(4, 4, BLANK);//blank

	printboard();//print out the board

	exit(EXIT_SUCCESS);//end of program
}

void printboard(void){//print out bord following the macros with space between each
	int i, j;
	printf("  ");//first 2 spaces
	for (i = 0; i < BOARD_SIZE; i++){//printf number for column
		printf("%2d", i + 1);//print number for column
	}
	printf("\n");//newline
	for (i = 0; i < BOARD_SIZE; i++){//each row
		printf("%2d ", i + 1);//print number for row
		for (j = 0; j < BOARD_SIZE; j++){//each position
			switch (board[i][j]){
			case BLACK://black
				printf(BLACK_PIECE);//print black
				break;
			case WHITE://white
				printf(WHITE_PIECE);//print white
				break;
			case STAR://spacial
				printf(STAR_POINT);//print white
				break;
			default://blank
				printf(BLANK_POINT);//blank piece
				break;
			}
		}
		printf("\n");//newline
	}


}



void init(void){//initialise variables
	memset(board, 0, BOARD_SIZE*BOARD_SIZE);//clear board
	//place / mark star points
	//4,4 points
	place(4, 4, STAR);
	place(4, 16, STAR);
	place(16, 4, STAR);
	place(16, 16, STAR);
	//4,10 points
	place(4, 10, STAR);
	place(10, 4, STAR);
	place(10, 16, STAR);
	place(16, 10, STAR);
	//10,10 points
	place(10, 10, STAR);
}


void place(unsigned char x, unsigned char y, unsigned char piece){//place a piece on board
	board[y - 1][x - 1] = piece;//set piece
	if (piece == BLANK){//if placng blank piece in one of the star points
		//4,4 points
		if (x == 4 && y == 4){//if at star point
			place(4, 4, STAR);
		}
		if (x == 4 && y == 16){//if at star point
			place(4, 16, STAR);
		}
		if (x == 16 && y == 4){//if at star point
			place(16, 4, STAR);
		}
		if (x == 16 && y == 16){//if at star point
			place(16, 16, STAR);
		}
		//4,10 points
		if (x == 4 && y == 10){//if at star point
			place(4, 10, STAR);
		}
		if (x == 10 && y == 4){//if at star point
			place(10, 4, STAR);
		}
		if (x == 10 && y == 16){//if at star point
			place(10, 16, STAR);
		}
		if (x == 16 && y == 10){//if at star point
			place(16, 10, STAR);
		}
		//10,10 points
		if (x == 10 && y == 10){//if at star point
			place(10, 10, STAR);
		}
	}
}
{'fraction_non_alphanumeric': 0.1842567059413387, 'fraction_numerical': 0.04888443218851843, 'mean_word_length': 3.0060240963855422, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '147652', 'n_tokens_mistral': 1795, 'n_tokens_neox': 1519, 'n_words': 457}