d
This commit is contained in:
1 parent
9a17647cc2
commit
110b44030d
7 files changed
+11
-3
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Whitespace-only changes.
@@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
# L4: Function.
|
# L4: Function.
|
||||||
|
|
||||||
def memory_generateConstPlayfield(
|
def memory_generateConstPlayfield(n: int) -> dict[int, int]:
|
||||||
n: int
|
|
||||||
) -> dict[int, int]:
|
|
||||||
idGroups: dict[int, int] = { }
|
idGroups: dict[int, int] = { }
|
||||||
id = 0
|
id = 0
|
||||||
for gid in range(0, n):
|
for gid in range(0, n):
|
||||||
|
|||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
IN=main.py
|
||||||
|
OUT=main-2.cpp
|
||||||
|
|
||||||
|
# Simple check. TODO REMOVE later
|
||||||
|
sed 's|# L4: Function.|// L4: Function.|' $IN > $OUT
|
||||||
|
|
||||||
|
# dict[X, Y] -> std::map<X, Y>
|
||||||
|
sed -E 's|dict\[(.*), (.*)\]|std::map<\1, \2>|' $IN > $OUT
|
||||||
|
# def functionName(X) -> Y -> Y functionName(X) {
|
||||||
|
sed -E 's|def (.*) -> (.*):|\2 \1 {|' $OUT > $OUT
|
||||||
Reference in new issue
Block a user