You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
686 B
37 lines
686 B
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "ticTacToe.h"
|
|
|
|
|
|
int something(int a){
|
|
return a;
|
|
}
|
|
|
|
void printPrompt(){
|
|
printf("Let's play Tic Tac Toe. You will use O, I will use X.\nJust enter the number of the field you choose as row col.\nYou start.\n");
|
|
}
|
|
|
|
void printField(char field[3][3]){
|
|
for (int i = 0; i < 3; i++){
|
|
for (int j = 0; j < 3; j++){
|
|
printf("%d", field[i][j]);
|
|
if (j < 2) {
|
|
printf("|");
|
|
}
|
|
}
|
|
printf("\n");
|
|
}
|
|
}
|
|
|
|
char initField(){
|
|
char field[3][3] =
|
|
{
|
|
{'-','-','-'},
|
|
{'-','-','-'},
|
|
{'-','-','-'}
|
|
};
|
|
return field;
|
|
}
|
|
|