Skip to content
Snippets Groups Projects
Commit 54b8a7b4 authored by Manuel Bucher's avatar Manuel Bucher
Browse files

added debug programs

parent 9b0b20f7
No related merge requests found
all: loesung
WARNINGS = -Wall #-Werror
WARNINGS = -Wall -Werror
OPTIONAL = -Wextra -Wpedantic -Wshadow
DEBUG = -g -ggdb -fno-omit-frame-pointer
OPTIMIZE = -Og -std=c11
OPTIMIZE = -std=c11
loesung: Makefile loesung.c
$(CC) -o $@ $(WARNINGS) $(OPTIONAL) $(DEBUG) $(OPTIMIZE) loesung.c
......
check 0 → 100755
#!/bin/bash
./loesung <$1 | ./check_result $1
......@@ -303,8 +303,7 @@ bool hk_dfs(Field *this, uint32_t e) {
void hk_print(Field *this) {
Tile *t = this->tiles;
for (uint32_t i = 1; i < this->num_tiles; i++) {
uint32_t p = t[i].pair;
if (this->tiles[i].pair == 0) {
if (t[i].pair == 0) {
printf("None\n");
return;
}
......
#!/usr/bin/python3
import sys
import matplotlib.pyplot as plt
import numpy as np
inp = sys.argv[1]
def load():
f = open(inp)
xs = []
ys = []
for line in f:
point = [int(i) for i in line.split()]
xs.append(point[0])
ys.append(point[1])
plt.scatter(xs, ys, marker="s")
plt.show()
while True:
load()
#!/usr/bin/python3
import sys
import matplotlib.pyplot as plt
import numpy as np
inp = sys.argv[1]
def load():
f = open(inp)
xs = []
ys = []
for line in f:
for p in line.split(";"):
point = [int(i) for i in p.split()]
xs.append(point[0])
ys.append(point[1])
xs.append(None)
ys.append(None)
plt.plot(xs, ys, marker="s")
plt.show()
while True:
load()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment