aboutsummaryrefslogtreecommitdiff
path: root/Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz
blob: b46112fe478f3cf364c169ce60062b6b86e9a8c7 (plain)
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
\tikzset{
  process/.style={
    rectangle,
    minimum width=2.5cm, minimum height=1cm,
    draw,
    text centered
  },
  % Decision (diamond)
  decision/.style={
    diamond, aspect=2,
    minimum width=2.5cm, minimum height=1cm,
    draw,
    text width=3cm,
    align=center
  },
  % Input/Output (parallelogram)
  io/.style={
    trapezium, trapezium left angle=70, trapezium right angle=110,
    minimum width=2.5cm, minimum height=1cm,
    draw, fill=green!20,
    text centered
  },
  % Arrow style
  arrow/.style={
    thick, ->, >=Stealth
  }
}

\begin{tikzpicture}
  \node (start) {};
  \node[decision, below=of start] (decision1) {\textcolor{magenta}{Kein Gestein vorhanden}};

  \node[process, below=of decision1] (process) {\textcolor{orange}{fahre()}};
  \node[process, below=2cm of process] (process2) {nimmGestein()};

  % Arrows
  \draw[arrow] (start) -- (decision1);
  \draw[arrow] (decision1) -- node[right] {Wahr} (process);

  % Decision branch
  \draw[arrow] (decision1) -- node[above] {Falsch} ($(decision1.east) + (1cm, 0)$) -- ($(decision1.east) + (1cm, -4cm)$) -- ($(decision1) + (0, -4cm)$) -- (process2);
  \draw[arrow] (process.west) -| (-3, -2.4) |- (decision1.west);
\end{tikzpicture}