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

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include "ticTacToe.h"
  5. int something(int a){
  6. return a;
  7. }
  8. void printPrompt(){
  9. 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");
  10. }
  11. void printField(char field[3][3]){
  12. for (int i = 0; i < 3; i++){
  13. for (int j = 0; j < 3; j++){
  14. printf("%d", field[i][j]);
  15. if (j < 2) {
  16. printf("|");
  17. }
  18. }
  19. printf("\n");
  20. }
  21. }
  22. char initField(){
  23. char field[3][3] =
  24. {
  25. {'-','-','-'},
  26. {'-','-','-'},
  27. {'-','-','-'}
  28. };
  29. return field;
  30. }