-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
51 lines (40 loc) · 878 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Here is the current plan for the connect for program:
*
* There will be a display, with capital O having an empty space, and o using a space.
*
* Here is a sample board:
*
* OOOOOOO
* OOOOOOO
* ooOOOoO
* oOOOOoO
*
*
*/
// Sets up the board with 42 'empty' slots
// uses chars for ease of use as well as for
// the 1 byte memory size
char* init_board(){
char* board = malloc(sizeof(char) * (6 * 7));
memset(board, 'X', 42);
}
// Prints out board (by character)
// Currently there is no feature to implement
// different colored boards
void print_board(char* board){
for (int i = 0; i < 42; i++){
printf("%c", board[i]);
if (i % 7 == 0){
printf("\n");
}
}
}
int main(){
printf("Hello world\n");
// Time to make the board
init_board();
return 0;
}