.
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
from Iinstruction import Iinstruction
|
|
||||||
import interpret_source as itp
|
|
||||||
import logging
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
from Iinstruction import Iinstruction
|
||||||
|
import logging
|
||||||
|
import interpret_source as itp
|
||||||
|
import code_to_image as cti
|
||||||
|
|
||||||
|
|
||||||
class NassiShneidermanDiagram:
|
class NassiShneidermanDiagram:
|
||||||
|
|
||||||
@@ -26,7 +28,7 @@ class NassiShneidermanDiagram:
|
|||||||
cti.NSD_init(x_size, 5000)
|
cti.NSD_init(x_size, 5000)
|
||||||
x, y, x_sz = 0, 0, x_size
|
x, y, x_sz = 0, 0, x_size
|
||||||
for _k, instruction in self.instructions.items():
|
for _k, instruction in self.instructions.items():
|
||||||
x, y = instruction.to_image(x, y, x_sz, 750)
|
x, y = instruction.to_image(x, y, x_sz, 800)
|
||||||
cti.NSD_save(filename)
|
cti.NSD_save(filename)
|
||||||
|
|
||||||
def load_from_file(self, filepath:str):
|
def load_from_file(self, filepath:str):
|
||||||
@@ -41,9 +43,6 @@ class NassiShneidermanDiagram:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
#for debugging
|
|
||||||
from Iinstruction import *
|
|
||||||
|
|
||||||
NSD = NassiShneidermanDiagram(True)
|
NSD = NassiShneidermanDiagram(True)
|
||||||
|
|
||||||
NSD.load_from_file("res/input/input.java")
|
NSD.load_from_file("res/input/input.java")
|
||||||
|
|||||||
Binary file not shown.
@@ -10,27 +10,10 @@ while(shouldNiet()) {
|
|||||||
niet10();
|
niet10();
|
||||||
niet11();
|
niet11();
|
||||||
}
|
}
|
||||||
if(if13) {
|
niet13();
|
||||||
niet14();
|
}
|
||||||
niet15();
|
niet15();
|
||||||
if(if16) {
|
niet16();
|
||||||
niet17();
|
|
||||||
niet18();
|
|
||||||
} else {
|
|
||||||
niet20();
|
|
||||||
niet21();
|
|
||||||
if(if22) {
|
|
||||||
niet23()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
niet27();
|
|
||||||
niet28();
|
|
||||||
}
|
|
||||||
niet30();
|
|
||||||
}
|
|
||||||
niet32();
|
|
||||||
niet33();
|
|
||||||
|
|
||||||
// drehe("links");
|
// drehe("links");
|
||||||
// while(huegelVorhanden("rechts"))
|
// while(huegelVorhanden("rechts"))
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 29 KiB |
Reference in New Issue
Block a user