Browse Source

refactoring: Main ausgelagert, Luis Hahn

remotes/origin/Läufer-fertig,-Hendrik-Voß
Luis Hahn 11 months ago
parent
commit
f913f3cfbc
  1. 7
      .vscode/launch.json
  2. 2
      build/test/dependencies/schach.d
  3. 2
      build/test/dependencies/test_schach.d
  4. BIN
      build/test/out/c/cmock.o
  5. BIN
      build/test/out/c/schach.o
  6. BIN
      build/test/out/c/test_schach.o
  7. BIN
      build/test/out/c/test_schach_runner.o
  8. BIN
      build/test/out/c/unity.o
  9. BIN
      build/test/out/test_schach.out
  10. 2
      build/test/results/test_schach.pass
  11. 16
      src/main.c
  12. 9
      src/main.h
  13. 14
      src/schach.c
  14. 2
      src/schach.h

7
.vscode/launch.json

@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}

2
build/test/dependencies/schach.d

@ -1 +1 @@
build/test/out/c/schach.o: src/schach.c
build/test/out/c/schach.o: src/schach.c src/main.h

2
build/test/dependencies/test_schach.d

@ -1,4 +1,4 @@
build/test/out/c/test_schach.o: test/test_schach.c \
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \
src/schach.h
src/schach.h src/main.h

BIN
build/test/out/c/cmock.o

BIN
build/test/out/c/schach.o

BIN
build/test/out/c/test_schach.o

BIN
build/test/out/c/test_schach_runner.o

BIN
build/test/out/c/unity.o

BIN
build/test/out/test_schach.out

2
build/test/results/test_schach.pass

@ -19,4 +19,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.06211079999047797
:time: 0.15252570000302512

16
src/main.c

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "schach.h"
int main() {
int x = 8;
int y = 8;
char** Spielfeld = create_Schachfeld(x, y);
print_Schachfeld(Spielfeld, x, y);
free_Schachfeld(Spielfeld, x);
return 0;
}

9
src/main.h

@ -0,0 +1,9 @@
#ifndef MAIN
#define MAIN
int main();
#endif

14
src/schach.c

@ -1,6 +1,8 @@
#include <stdlib.h>
#include <stdio.h>
#include "main.h"
/*
Spielablauf:
1. Ausgabe vom Spielfeld
@ -101,16 +103,4 @@ void free_Schachfeld(char** Spielfeld, int x) {
free(Spielfeld);
}
/*
int main() {
int x = 8;
int y = 8;
char** Spielfeld = create_Schachfeld(x, y);
print_Schachfeld(Spielfeld, x, y);
free_Schachfeld(Spielfeld, x);
return 0;
}
*/

2
src/schach.h

@ -1,6 +1,8 @@
#ifndef SCHACH
#define SCHACH
#include "main.h"
void print_Schachfeld(char** , int , int );
char** create_Schachfeld(int , int );
void free_Schachfeld(char** , int );

Loading…
Cancel
Save