Skip to content

Commit 0d3aaa5

Browse files
authored
Update readme, add contribution guide etc (#82)
* Update readme and the course structure a little bit * Add detekt * Add more actions and fix styles * Add badges * Add LICENSE * Add MIT badge
1 parent 42af505 commit 0d3aaa5

File tree

181 files changed

+912
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+912
-601
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Gradle Build With Detekt
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-20.04
8+
9+
steps:
10+
- uses: actions/[email protected]
11+
- name: Set up JDK 11
12+
uses: actions/[email protected]
13+
with:
14+
java-version: 11
15+
distribution: liberica
16+
- name: Gradle Wrapper Validation
17+
uses: gradle/[email protected]
18+
- uses: gradle/[email protected]
19+
with:
20+
arguments: build --stacktrace -PrunDetekt -x test
21+

.github/workflows/gradle-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
uses: gradle/[email protected]
1818
- uses: gradle/[email protected]
1919
with:
20-
arguments: build --stacktrace
20+
arguments: build --stacktrace -x test
2121

.github/workflows/gradle-test.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Gradle Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-20.04
8+
9+
steps:
10+
- uses: actions/[email protected]
11+
- name: Set up JDK 11
12+
uses: actions/[email protected]
13+
with:
14+
java-version: 11
15+
distribution: liberica
16+
- name: Gradle Wrapper Validation
17+
uses: gradle/[email protected]
18+
- uses: gradle/[email protected]
19+
with:
20+
arguments: test
21+

Part1/AlmostDone/FinishTheGame/src/main/kotlin/Images.kt renamed to Introduction/AlmostDone/FinishTheGame/src/main/kotlin/Images.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val spongeBob = """
24
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
35
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val borderSymbol = '#'
24
val separator = ' '
35
val newLineSymbol = System.lineSeparator()
@@ -6,4 +8,4 @@ fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length }
68

79
fun getPictureByName(name: String) = allImages[name]
810

9-
fun allPictures() = allImages.keys
11+
fun allPictures() = allImages.keys

Part1/AlmostDone/MultiRowStrings/src/main/kotlin/Images.kt renamed to Introduction/AlmostDone/Introduction/src/main/kotlin/Images.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val spongeBob = """
24
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
35
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val borderSymbol = '#'
24
val separator = ' '
35
val newLineSymbol = System.lineSeparator()
@@ -6,4 +8,4 @@ fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length }
68

79
fun getPictureByName(name: String) = allImages[name]
810

9-
fun allPictures() = allImages.keys
11+
fun allPictures() = allImages.keys

Part1/AlmostDone/Introduction/src/main/kotlin/Images.kt renamed to Introduction/AlmostDone/MultiRowStrings/src/main/kotlin/Images.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val spongeBob = """
24
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
35
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val borderSymbol = '#'
24
val separator = ' '
35
val newLineSymbol = System.lineSeparator()
@@ -6,4 +8,4 @@ fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length }
68

79
fun getPictureByName(name: String) = allImages[name]
810

9-
fun allPictures() = allImages.keys
11+
fun allPictures() = allImages.keys

Part1/AlmostDone/NullSafety/src/main/kotlin/Images.kt renamed to Introduction/AlmostDone/NullSafety/src/main/kotlin/Images.kt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val spongeBob = """
24
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
35
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("MayBeConst")
2+
13
val borderSymbol = '#'
24
val separator = ' '
35
val newLineSymbol = System.lineSeparator()
@@ -6,4 +8,4 @@ fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length }
68

79
fun getPictureByName(name: String) = allImages[name]
810

9-
fun allPictures() = allImages.keys
11+
fun allPictures() = allImages.keys
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
@file:Suppress("MayBeConst")
2+
3+
val spongeBob = """
4+
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
5+
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
6+
▕╮╰▏╯┃╭╮┃┃╭╮┃╰▏
7+
▕╯┈▏┈┗┻┻┛┗┻┻┻╮▏
8+
▕╭╮▏╮┈┈┈┈┏━━━╯▏
9+
▕╰╯▏╯╰┳┳┳┳┳┳╯╭▏
10+
▕┈╭▏╭╮┃┗┛┗┛┃┈╰▏
11+
▕┈╰▏╰╯╰━━━━╯┈┈▏
12+
"""
13+
14+
val simba = """
15+
┈╱▔╲▂╱╱╱╱▂╱▔╲┈┈
16+
▕▔╲┈╱▔╲┈┈╱╲╱▔▏┈
17+
▕▏┈▏╱▉╲┈┈╱▉╲▕▏┈
18+
┈╲▃▏▔▔▔╲▂▂▂▕╱┈┈
19+
┈┈┈▏┊┊┳┊╲▂╱┳▏┈┈
20+
┈┈▕╲▂┊╰━━┻━╱┈┈┈
21+
┈┈╱┈┈▔▔╲▂▂╱╲┈┈┈
22+
"""
23+
24+
val brianGriffin = """
25+
╭━┳━╭━╭━╮╮
26+
┃┈┈┈┣▅╋▅┫┃
27+
┃┈┃┈╰━╰━━━━━━╮
28+
╰┳╯┈┈┈┈┈┈┈┈┈◢▉◣
29+
╲┃┈┈┈┈┈┈┈┈┈┈▉▉▉
30+
╲┃┈┈┈┈┈┈┈┈┈┈◥▉◤
31+
╲┃┈┈┈┈╭━┳━━━━╯
32+
╲┣━━━━━━┫
33+
"""
34+
35+
val cat = """
36+
┈┈╱╲┈┈┈╱╲┈┈╭━╮┈
37+
┈╱╱╲╲__╱╱╲╲╰╮┃┈
38+
┈▏┏┳╮┈╭┳┓▕┈┈┃┃┈
39+
┈▏╰┻┛▼┗┻╯▕┈┈┃┃┈
40+
┈╲┈┈╰┻╯┈┈╱▔▔┈┃┈
41+
┈┈╰━┳━━━╯┈┈┈┈┃┈
42+
┈┈┈┈┃┏┓┣━━┳┳┓┃┈
43+
┈┈┈┈┗┛┗┛┈┈┗┛┗┛┈
44+
"""
45+
46+
val pig = """
47+
┈┏━╮╭━┓┈╭━━━━╮
48+
┈┃┏┗┛┓┃╭┫ ┃
49+
┈╰┓▋▋┏╯╯╰━━━━╯
50+
╭━┻╮╲┗━━━━╮╭╮┈
51+
┃▎▎┃╲╲╲╲╲╲┣━╯┈
52+
╰━┳┻▅╯╲╲╲╲┃┈┈┈
53+
┈┈╰━┳┓┏┳┓┏╯┈┈┈
54+
┈┈┈┈┗┻┛┗┻┛┈┈┈┈
55+
"""
56+
57+
val fox = """
58+
╱▏┈┈┈┈┈┈▕╲▕╲┈┈┈
59+
▏▏┈┈┈┈┈┈▕▏▔▔╲┈┈
60+
▏╲┈┈┈┈┈┈╱┈▔┈▔╲┈
61+
╲▏▔▔▔▔▔▔╯╯╰┳━━▀
62+
┈▏╯╯╯╯╯╯╯╯╱┃┈┈┈
63+
┈┃┏┳┳━━━┫┣┳┃┈┈┈
64+
┈┃┃┃┃┈┈┈┃┃┃┃┈┈┈
65+
┈┗┛┗┛┈┈┈┗┛┗┛┈┈┈
66+
"""
67+
68+
val monkey = """
69+
┊┊┊╱▔▔▔▔▔╲┊┊┊┊┊
70+
┊┊╱┈┈╱▔╲╲╲▏┊┊┊┊
71+
┊╱┈╭━━╱▔▔▔▔╲━━╮
72+
┊▏┈┃▔▔▏╭▅╭▅▕▔▔┃
73+
┊▏┈╰━╱┈╭┳┳╮┳╲━╯
74+
┊╲┈┈╲▏╭━━━━╯▕┊┊
75+
┊┊╲┈┈╲▂▂▂▂▂▂╱▔╲
76+
"""
77+
78+
val elephant = """
79+
┈┈┈┈╱▔▔▔▔▔╲┈╱▔╲
80+
┈┈┈┈▏┈┈▏╭╮▕┈▏╳▕
81+
┈┈┈┈▏┈┈▏┈┈▕┈╲▂╱
82+
┈╱▔▔╲▂╱╲▂▂┈╲▂▏▏
83+
╭▏┈┈┈┈┈┈┈▏╲▂▂╱┈
84+
┃▏┈┈┈┈▏┈┈▏┈┈┈┈┈
85+
╯▏┈╲╱▔╲▅▅▏┈┈┈┈┈
86+
┈╲▅▅▏▕▔▔▔▔▏┈┈┈┈
87+
"""
88+
89+
val android = """
90+
┈┈┈╲┈┈┈┈╱
91+
┈┈┈╱▔▔▔▔╲
92+
┈┈┃┈▇┈┈▇┈┃
93+
╭╮┣━━━━━━┫╭╮
94+
┃┃┃┈┈┈┈┈┈┃┃┃
95+
╰╯┃┈┈┈┈┈┈┃╰╯
96+
┈┈╰┓┏━━┓┏╯
97+
┈┈┈╰╯┈┈╰╯
98+
"""
99+
100+
val apple = """
101+
┊┊┊┊┊┊┊╱▏┊┊┊┊┊┊
102+
┊┊┊┊┊┊▕╱┊┊┊┊┊┊┊
103+
┊┊┊╱▔▔╲┊╱▔▔╲┊┊┊
104+
┊┊▕┈┈┈┈▔┈┈┈╱┊┊┊
105+
┊┊▕┈┈┈┈┈┈┈┈╲┊┊┊
106+
┊┊┊╲┈┈┈┈┈┈┈╱┊┊┊
107+
┊┊┊┊╲▂▂▂▂▂╱┊┊┊┊
108+
"""
109+
110+
val allImages = mapOf(
111+
"spongeBob" to spongeBob,
112+
"simba" to simba,
113+
"brianGriffin" to brianGriffin,
114+
"cat" to cat,
115+
"pig" to pig,
116+
"fox" to fox,
117+
"monkey" to monkey,
118+
"elephant" to elephant,
119+
"android" to android,
120+
"apple" to apple,
121+
)
122+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@file:Suppress("MayBeConst")
2+
3+
val borderSymbol = '#'
4+
val separator = ' '
5+
val newLineSymbol = System.lineSeparator()
6+
7+
fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length } ?: 0
8+
9+
fun getPictureByName(name: String) = allImages[name]
10+
11+
fun allPictures() = allImages.keys
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
@file:Suppress("MayBeConst")
2+
3+
val spongeBob = """
4+
┈┈╱▔▔▔▔▔▔▔▔▔▔▔▏
5+
┈╱╭▏╮╭┻┻╮╭┻┻╮╭▏
6+
▕╮╰▏╯┃╭╮┃┃╭╮┃╰▏
7+
▕╯┈▏┈┗┻┻┛┗┻┻┻╮▏
8+
▕╭╮▏╮┈┈┈┈┏━━━╯▏
9+
▕╰╯▏╯╰┳┳┳┳┳┳╯╭▏
10+
▕┈╭▏╭╮┃┗┛┗┛┃┈╰▏
11+
▕┈╰▏╰╯╰━━━━╯┈┈▏
12+
"""
13+
14+
val simba = """
15+
┈╱▔╲▂╱╱╱╱▂╱▔╲┈┈
16+
▕▔╲┈╱▔╲┈┈╱╲╱▔▏┈
17+
▕▏┈▏╱▉╲┈┈╱▉╲▕▏┈
18+
┈╲▃▏▔▔▔╲▂▂▂▕╱┈┈
19+
┈┈┈▏┊┊┳┊╲▂╱┳▏┈┈
20+
┈┈▕╲▂┊╰━━┻━╱┈┈┈
21+
┈┈╱┈┈▔▔╲▂▂╱╲┈┈┈
22+
"""
23+
24+
val brianGriffin = """
25+
╭━┳━╭━╭━╮╮
26+
┃┈┈┈┣▅╋▅┫┃
27+
┃┈┃┈╰━╰━━━━━━╮
28+
╰┳╯┈┈┈┈┈┈┈┈┈◢▉◣
29+
╲┃┈┈┈┈┈┈┈┈┈┈▉▉▉
30+
╲┃┈┈┈┈┈┈┈┈┈┈◥▉◤
31+
╲┃┈┈┈┈╭━┳━━━━╯
32+
╲┣━━━━━━┫
33+
"""
34+
35+
val cat = """
36+
┈┈╱╲┈┈┈╱╲┈┈╭━╮┈
37+
┈╱╱╲╲__╱╱╲╲╰╮┃┈
38+
┈▏┏┳╮┈╭┳┓▕┈┈┃┃┈
39+
┈▏╰┻┛▼┗┻╯▕┈┈┃┃┈
40+
┈╲┈┈╰┻╯┈┈╱▔▔┈┃┈
41+
┈┈╰━┳━━━╯┈┈┈┈┃┈
42+
┈┈┈┈┃┏┓┣━━┳┳┓┃┈
43+
┈┈┈┈┗┛┗┛┈┈┗┛┗┛┈
44+
"""
45+
46+
val pig = """
47+
┈┏━╮╭━┓┈╭━━━━╮
48+
┈┃┏┗┛┓┃╭┫ ┃
49+
┈╰┓▋▋┏╯╯╰━━━━╯
50+
╭━┻╮╲┗━━━━╮╭╮┈
51+
┃▎▎┃╲╲╲╲╲╲┣━╯┈
52+
╰━┳┻▅╯╲╲╲╲┃┈┈┈
53+
┈┈╰━┳┓┏┳┓┏╯┈┈┈
54+
┈┈┈┈┗┻┛┗┻┛┈┈┈┈
55+
"""
56+
57+
val fox = """
58+
╱▏┈┈┈┈┈┈▕╲▕╲┈┈┈
59+
▏▏┈┈┈┈┈┈▕▏▔▔╲┈┈
60+
▏╲┈┈┈┈┈┈╱┈▔┈▔╲┈
61+
╲▏▔▔▔▔▔▔╯╯╰┳━━▀
62+
┈▏╯╯╯╯╯╯╯╯╱┃┈┈┈
63+
┈┃┏┳┳━━━┫┣┳┃┈┈┈
64+
┈┃┃┃┃┈┈┈┃┃┃┃┈┈┈
65+
┈┗┛┗┛┈┈┈┗┛┗┛┈┈┈
66+
"""
67+
68+
val monkey = """
69+
┊┊┊╱▔▔▔▔▔╲┊┊┊┊┊
70+
┊┊╱┈┈╱▔╲╲╲▏┊┊┊┊
71+
┊╱┈╭━━╱▔▔▔▔╲━━╮
72+
┊▏┈┃▔▔▏╭▅╭▅▕▔▔┃
73+
┊▏┈╰━╱┈╭┳┳╮┳╲━╯
74+
┊╲┈┈╲▏╭━━━━╯▕┊┊
75+
┊┊╲┈┈╲▂▂▂▂▂▂╱▔╲
76+
"""
77+
78+
val elephant = """
79+
┈┈┈┈╱▔▔▔▔▔╲┈╱▔╲
80+
┈┈┈┈▏┈┈▏╭╮▕┈▏╳▕
81+
┈┈┈┈▏┈┈▏┈┈▕┈╲▂╱
82+
┈╱▔▔╲▂╱╲▂▂┈╲▂▏▏
83+
╭▏┈┈┈┈┈┈┈▏╲▂▂╱┈
84+
┃▏┈┈┈┈▏┈┈▏┈┈┈┈┈
85+
╯▏┈╲╱▔╲▅▅▏┈┈┈┈┈
86+
┈╲▅▅▏▕▔▔▔▔▏┈┈┈┈
87+
"""
88+
89+
val android = """
90+
┈┈┈╲┈┈┈┈╱
91+
┈┈┈╱▔▔▔▔╲
92+
┈┈┃┈▇┈┈▇┈┃
93+
╭╮┣━━━━━━┫╭╮
94+
┃┃┃┈┈┈┈┈┈┃┃┃
95+
╰╯┃┈┈┈┈┈┈┃╰╯
96+
┈┈╰┓┏━━┓┏╯
97+
┈┈┈╰╯┈┈╰╯
98+
"""
99+
100+
val apple = """
101+
┊┊┊┊┊┊┊╱▏┊┊┊┊┊┊
102+
┊┊┊┊┊┊▕╱┊┊┊┊┊┊┊
103+
┊┊┊╱▔▔╲┊╱▔▔╲┊┊┊
104+
┊┊▕┈┈┈┈▔┈┈┈╱┊┊┊
105+
┊┊▕┈┈┈┈┈┈┈┈╲┊┊┊
106+
┊┊┊╲┈┈┈┈┈┈┈╱┊┊┊
107+
┊┊┊┊╲▂▂▂▂▂╱┊┊┊┊
108+
"""
109+
110+
val allImages = mapOf(
111+
"spongeBob" to spongeBob,
112+
"simba" to simba,
113+
"brianGriffin" to brianGriffin,
114+
"cat" to cat,
115+
"pig" to pig,
116+
"fox" to fox,
117+
"monkey" to monkey,
118+
"elephant" to elephant,
119+
"android" to android,
120+
"apple" to apple,
121+
)
122+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@file:Suppress("MayBeConst")
2+
3+
val borderSymbol = '#'
4+
val separator = ' '
5+
val newLineSymbol = System.lineSeparator()
6+
7+
fun getPictureWidth(picture: String) = picture.lines().maxOfOrNull { it.length } ?: 0
8+
9+
fun getPictureByName(name: String) = allImages[name]
10+
11+
fun allPictures() = allImages.keys

0 commit comments

Comments
 (0)