aboutsummaryrefslogtreecommitdiffstats
path: root/src/test_board.c
blob: e9a75bd329fb5ecf99eaa00e376c6d2f0680353e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include "board.h"

int main () {
	printf("sizeof(unsigned int): %d\n", sizeof(unsigned int));
	BOARD jim = newboard(10, 10);
	for (unsigned int y = 0; y < 10; ++y) {
		for (unsigned int x = 0; x < 10; ++x)
			putchar(board_getval(jim, x, y) == 0 ? '.' : '#');
		putchar('\n');
	}
	board_setval(jim, 0, 3, 1);
	board_setval(jim, 4, 5, 1);
	for (unsigned int y = 0; y < 10; ++y) {
		for (unsigned int x = 0; x < 10; ++x)
			putchar(board_getval(jim, x, y) == 0 ? '.' : '#');
		putchar('\n');
	}
	delboard(jim);
	return 0;
}