trackler 2.0.6.32 → 2.0.6.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/exercises/bank-account/BankAccountTest.cs +8 -8
- data/tracks/csharp/exercises/bank-account/Example.cs +9 -6
- data/tracks/fsharp/exercises/markdown/Example.fs +2 -2
- data/tracks/fsharp/exercises/markdown/Markdown.fs +8 -8
- data/tracks/fsharp/exercises/markdown/MarkdownTest.fs +4 -4
- data/tracks/go/exercises/bank-account/bank_account_test.go +8 -0
- data/tracks/go/exercises/bank-account/example.go +2 -0
- data/tracks/go/exercises/beer-song/beer_test.go +6 -6
- data/tracks/go/exercises/binary-search-tree/binary_search_tree_test.go +8 -0
- data/tracks/go/exercises/binary-search-tree/example.go +2 -0
- data/tracks/go/exercises/word-count/cases_test.go +1 -0
- data/tracks/java/config.json +7 -1
- data/tracks/java/exercises/perfect-numbers/build.gradle +17 -0
- data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +1 -0
- data/tracks/java/exercises/perfect-numbers/src/example/java/NaturalNumber.java +30 -0
- data/tracks/java/exercises/perfect-numbers/src/main/java/Classification.java +5 -0
- data/tracks/java/exercises/perfect-numbers/src/main/java/NaturalNumber.java +5 -0
- data/tracks/java/exercises/perfect-numbers/src/test/java/NaturalNumberTest.java +61 -0
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/lua/docs/INSTALLATION.md +70 -6
- data/tracks/lua/docs/LEARNING.md +5 -1
- data/tracks/lua/docs/RESOURCES.md +6 -6
- data/tracks/lua/exercises/minesweeper/example.lua +1 -5
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5a4eccbddd152c661534a7ae9a71ad4fd71f6ab
|
4
|
+
data.tar.gz: 4d1ec7fec9f35886d314ad5bee617846f3395cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56de61b12c3dd2fca7521f9ea629f5a0029d68a941156fa335f5f60ff466b19a1425da7eb528d89c18de8b11dfe5791cefc5d41a20fd3f7e2bb5b6d5acfa7d6c
|
7
|
+
data.tar.gz: e94acef7c5f3926878c87cf57a3b5fb3ced167acfed7f3662943a0a4a2d934e163ef2dbb06f6811f63685aff89e8061eda64d8bf3869f199a1bf11df0a2ba94f
|
data/lib/trackler/version.rb
CHANGED
@@ -11,7 +11,7 @@ public class BankAccountTest
|
|
11
11
|
var account = new BankAccount();
|
12
12
|
account.Open();
|
13
13
|
|
14
|
-
Assert.That(account.
|
14
|
+
Assert.That(account.Balance, Is.EqualTo(0));
|
15
15
|
}
|
16
16
|
|
17
17
|
[Ignore("Remove to run test")]
|
@@ -21,10 +21,10 @@ public class BankAccountTest
|
|
21
21
|
var account = new BankAccount();
|
22
22
|
account.Open();
|
23
23
|
|
24
|
-
var openingBalance = account.
|
24
|
+
var openingBalance = account.Balance;
|
25
25
|
|
26
26
|
account.UpdateBalance(10);
|
27
|
-
var updatedBalance = account.
|
27
|
+
var updatedBalance = account.Balance;
|
28
28
|
|
29
29
|
Assert.That(openingBalance, Is.EqualTo(0));
|
30
30
|
Assert.That(updatedBalance, Is.EqualTo(10));
|
@@ -36,13 +36,13 @@ public class BankAccountTest
|
|
36
36
|
{
|
37
37
|
var account = new BankAccount();
|
38
38
|
account.Open();
|
39
|
-
var openingBalance = account.
|
39
|
+
var openingBalance = account.Balance;
|
40
40
|
|
41
41
|
account.UpdateBalance(10);
|
42
|
-
var addedBalance = account.
|
42
|
+
var addedBalance = account.Balance;
|
43
43
|
|
44
44
|
account.UpdateBalance(-15);
|
45
|
-
var subtractedBalance = account.
|
45
|
+
var subtractedBalance = account.Balance;
|
46
46
|
|
47
47
|
Assert.That(openingBalance, Is.EqualTo(0));
|
48
48
|
Assert.That(addedBalance, Is.EqualTo(10));
|
@@ -57,7 +57,7 @@ public class BankAccountTest
|
|
57
57
|
account.Open();
|
58
58
|
account.Close();
|
59
59
|
|
60
|
-
Assert.
|
60
|
+
Assert.That(() => account.Balance, Throws.InvalidOperationException);
|
61
61
|
}
|
62
62
|
|
63
63
|
[Ignore("Remove to run test")]
|
@@ -84,6 +84,6 @@ public class BankAccountTest
|
|
84
84
|
}
|
85
85
|
Task.WaitAll(tasks.ToArray());
|
86
86
|
|
87
|
-
Assert.That(account.
|
87
|
+
Assert.That(account.Balance, Is.EqualTo(0));
|
88
88
|
}
|
89
89
|
}
|
@@ -23,16 +23,19 @@ public class BankAccount
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
-
public float
|
26
|
+
public float Balance
|
27
27
|
{
|
28
|
-
|
28
|
+
get
|
29
29
|
{
|
30
|
-
|
30
|
+
lock (_lock)
|
31
31
|
{
|
32
|
-
|
33
|
-
|
32
|
+
if (!isOpen)
|
33
|
+
{
|
34
|
+
throw new InvalidOperationException("Cannot get balance on an account that isn't open");
|
35
|
+
}
|
34
36
|
|
35
|
-
|
37
|
+
return balance;
|
38
|
+
}
|
36
39
|
}
|
37
40
|
}
|
38
41
|
|
@@ -26,10 +26,10 @@ let rec parse (markdown: string) =
|
|
26
26
|
|
27
27
|
if __pos' > -1 then
|
28
28
|
if __pos + 2 >= (line.Length - 1) then
|
29
|
-
line <- line.[0.. __pos - 1] + "<
|
29
|
+
line <- line.[0.. __pos - 1] + "<strong>" + line.[__pos + 2 .. __pos' - 1] + "</strong>"
|
30
30
|
__pos <- __pos' + 1
|
31
31
|
else
|
32
|
-
line <- line.[0.. __pos - 1] + "<
|
32
|
+
line <- line.[0.. __pos - 1] + "<strong>" + line.[__pos + 2 .. __pos' - 1] + "</strong>" + line.[__pos' + 2 ..]
|
33
33
|
__pos <- __pos' + 1
|
34
34
|
else
|
35
35
|
__pos <- -1
|
@@ -41,10 +41,10 @@ let rec parse (markdown: string) =
|
|
41
41
|
|
42
42
|
if __pos' > -1 then
|
43
43
|
if __pos + 1 >= (line.Length - 1) then
|
44
|
-
line <- line.[0.. __pos - 1] + "<
|
44
|
+
line <- line.[0.. __pos - 1] + "<em>" + line.[__pos + 1 .. __pos' - 1] + "</em>"
|
45
45
|
__pos <- __pos' + 1
|
46
46
|
else
|
47
|
-
line <- line.[0.. __pos - 1] + "<
|
47
|
+
line <- line.[0.. __pos - 1] + "<em>" + line.[__pos + 1 .. __pos' - 1] + "</em>" + line.[__pos' + 1 ..]
|
48
48
|
__pos <- __pos' + 1
|
49
49
|
else
|
50
50
|
__pos <- -1
|
@@ -75,10 +75,10 @@ let rec parse (markdown: string) =
|
|
75
75
|
|
76
76
|
if __pos' > -1 then
|
77
77
|
if __pos + 2 >= (line.Length - 1) then
|
78
|
-
line <- line.[0.. __pos - 1] + "<
|
78
|
+
line <- line.[0.. __pos - 1] + "<strong>" + line.[__pos + 2 .. __pos' - 1] + "</strong>"
|
79
79
|
__pos <- __pos' + 1
|
80
80
|
else
|
81
|
-
line <- line.[0.. __pos - 1] + "<
|
81
|
+
line <- line.[0.. __pos - 1] + "<strong>" + line.[__pos + 2 .. __pos' - 1] + "</strong>" + line.[__pos' + 2 ..]
|
82
82
|
__pos <- __pos' + 1
|
83
83
|
else
|
84
84
|
__pos <- -1
|
@@ -90,10 +90,10 @@ let rec parse (markdown: string) =
|
|
90
90
|
|
91
91
|
if __pos' > -1 then
|
92
92
|
if __pos + 1 >= (line.Length - 1) then
|
93
|
-
line <- line.[0.. __pos - 1] + "<
|
93
|
+
line <- line.[0.. __pos - 1] + "<em>" + line.[__pos + 1 .. __pos' - 1] + "</em>"
|
94
94
|
__pos <- __pos' + 1
|
95
95
|
else
|
96
|
-
line <- line.[0.. __pos - 1] + "<
|
96
|
+
line <- line.[0.. __pos - 1] + "<em>" + line.[__pos + 1 .. __pos' - 1] + "</em>" + line.[__pos' + 1 ..]
|
97
97
|
__pos <- __pos' + 1
|
98
98
|
else
|
99
99
|
__pos <- -1
|
@@ -13,19 +13,19 @@ let ``Parses normal text as a paragraph`` () =
|
|
13
13
|
[<Test>]
|
14
14
|
let ``Parsing italics`` () =
|
15
15
|
let input = "_This will be italic_"
|
16
|
-
let expected = "<p><
|
16
|
+
let expected = "<p><em>This will be italic</em></p>"
|
17
17
|
Assert.That(parse input, Is.EqualTo(expected))
|
18
18
|
|
19
19
|
[<Test>]
|
20
20
|
let ``Parsing bold text`` () =
|
21
21
|
let input = "__This will be bold__"
|
22
|
-
let expected = "<p><
|
22
|
+
let expected = "<p><strong>This will be bold</strong></p>"
|
23
23
|
Assert.That(parse input, Is.EqualTo(expected))
|
24
24
|
|
25
25
|
[<Test>]
|
26
26
|
let ``Mixed normal, italics and bold text`` () =
|
27
27
|
let input = "This will _be_ __mixed__"
|
28
|
-
let expected = "<p>This will <
|
28
|
+
let expected = "<p>This will <em>be</em> <strong>mixed</strong></p>"
|
29
29
|
Assert.That(parse input, Is.EqualTo(expected))
|
30
30
|
|
31
31
|
[<Test>]
|
@@ -55,5 +55,5 @@ let ``Unordered lists`` () =
|
|
55
55
|
[<Test>]
|
56
56
|
let ``With a little bit of everything`` () =
|
57
57
|
let input = "# Header!\n* __Bold Item__\n* _Italic Item_"
|
58
|
-
let expected = "<h1>Header!</h1><ul><li><
|
58
|
+
let expected = "<h1>Header!</h1><ul><li><strong>Bold Item</strong></li><li><em>Italic Item</em></li></ul>"
|
59
59
|
Assert.That(parse input, Is.EqualTo(expected))
|
@@ -20,6 +20,14 @@ import (
|
|
20
20
|
"time"
|
21
21
|
)
|
22
22
|
|
23
|
+
const targetTestVersion = 1
|
24
|
+
|
25
|
+
func TestTestVersion(t *testing.T) {
|
26
|
+
if testVersion != targetTestVersion {
|
27
|
+
t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
23
31
|
func TestSeqOpenBalanceClose(t *testing.T) {
|
24
32
|
// open account
|
25
33
|
const amt = 10
|
@@ -6,12 +6,6 @@ import (
|
|
6
6
|
|
7
7
|
const targetTestVersion = 1
|
8
8
|
|
9
|
-
func TestTestVersion(t *testing.T) {
|
10
|
-
if testVersion != targetTestVersion {
|
11
|
-
t.Errorf("Found testVersion = %v, want %v.", testVersion, targetTestVersion)
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
9
|
const verse8 = "8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n"
|
16
10
|
const verse3 = "3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n"
|
17
11
|
const verse2 = "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
|
@@ -54,6 +48,12 @@ var verseTestCases = []struct {
|
|
54
48
|
{"invalid verse", 104, "", true},
|
55
49
|
}
|
56
50
|
|
51
|
+
func TestTestVersion(t *testing.T) {
|
52
|
+
if testVersion != targetTestVersion {
|
53
|
+
t.Fatalf("Found testVersion = %v, want %v.", testVersion, targetTestVersion)
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
57
|
func TestBottlesVerse(t *testing.T) {
|
58
58
|
for _, tt := range verseTestCases {
|
59
59
|
actualVerse, err := Verse(tt.verse)
|
@@ -19,6 +19,14 @@ import (
|
|
19
19
|
"testing"
|
20
20
|
)
|
21
21
|
|
22
|
+
const targetTestVersion = 1
|
23
|
+
|
24
|
+
func TestTestVersion(t *testing.T) {
|
25
|
+
if testVersion != targetTestVersion {
|
26
|
+
t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
22
30
|
func TestDataIsRetained(t *testing.T) {
|
23
31
|
actual := Bst(4).data
|
24
32
|
expected := 4
|
data/tracks/java/config.json
CHANGED
@@ -61,7 +61,8 @@
|
|
61
61
|
"clock",
|
62
62
|
"diamond",
|
63
63
|
"secret-handshake",
|
64
|
-
"flatten-array"
|
64
|
+
"flatten-array",
|
65
|
+
"perfect-numbers"
|
65
66
|
],
|
66
67
|
"exercises": [
|
67
68
|
{
|
@@ -353,6 +354,11 @@
|
|
353
354
|
"slug": "flatten-array",
|
354
355
|
"difficulty": 1,
|
355
356
|
"topics": []
|
357
|
+
},
|
358
|
+
{
|
359
|
+
"slug": "perfect-numbers",
|
360
|
+
"difficulty": 1,
|
361
|
+
"topics": []
|
356
362
|
}
|
357
363
|
],
|
358
364
|
"deprecated": [
|
@@ -0,0 +1,17 @@
|
|
1
|
+
apply plugin: "java"
|
2
|
+
apply plugin: "eclipse"
|
3
|
+
apply plugin: "idea"
|
4
|
+
|
5
|
+
repositories {
|
6
|
+
mavenCentral()
|
7
|
+
}
|
8
|
+
|
9
|
+
dependencies {
|
10
|
+
testCompile "junit:junit:4.12"
|
11
|
+
}
|
12
|
+
test {
|
13
|
+
testLogging {
|
14
|
+
exceptionFormat = 'full'
|
15
|
+
events = ["passed", "failed", "skipped"]
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
tracks/java/exercises/perfect-numbers/src/example/java/../../main/java/Classification.java
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import java.util.stream.IntStream;
|
2
|
+
|
3
|
+
final class NaturalNumber {
|
4
|
+
|
5
|
+
private final int naturalNumber;
|
6
|
+
|
7
|
+
NaturalNumber(int naturalNumber) {
|
8
|
+
if (naturalNumber <= 0) throw new IllegalStateException("Natural numbers are all positive.");
|
9
|
+
this.naturalNumber = naturalNumber;
|
10
|
+
}
|
11
|
+
|
12
|
+
Classification getClassification() {
|
13
|
+
final int aliquotSum = computeAliquotSum();
|
14
|
+
|
15
|
+
if (aliquotSum == naturalNumber) {
|
16
|
+
return Classification.PERFECT;
|
17
|
+
} else if (aliquotSum > naturalNumber) {
|
18
|
+
return Classification.ABUNDANT;
|
19
|
+
} else {
|
20
|
+
return Classification.DEFICIENT;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
private int computeAliquotSum() {
|
25
|
+
return IntStream.range(1, naturalNumber)
|
26
|
+
.filter(it -> naturalNumber % it == 0)
|
27
|
+
.sum();
|
28
|
+
}
|
29
|
+
|
30
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import org.junit.Ignore;
|
2
|
+
import org.junit.Test;
|
3
|
+
|
4
|
+
import static org.junit.Assert.assertEquals;
|
5
|
+
|
6
|
+
public final class NaturalNumberTest {
|
7
|
+
|
8
|
+
@Test
|
9
|
+
public void testSmallPerfectNumberIsClassifiedCorrectly() {
|
10
|
+
assertEquals(Classification.PERFECT, new NaturalNumber(6).getClassification());
|
11
|
+
}
|
12
|
+
|
13
|
+
@Ignore
|
14
|
+
@Test
|
15
|
+
public void testMediumPerfectNumberIsClassifiedCorrectly() {
|
16
|
+
assertEquals(Classification.PERFECT, new NaturalNumber(28).getClassification());
|
17
|
+
}
|
18
|
+
|
19
|
+
@Ignore
|
20
|
+
@Test
|
21
|
+
public void testLargePerfectNumberIsClassifiedCorrectly() {
|
22
|
+
assertEquals(Classification.PERFECT, new NaturalNumber(33550336).getClassification());
|
23
|
+
}
|
24
|
+
|
25
|
+
@Ignore
|
26
|
+
@Test
|
27
|
+
public void testSmallAbundantNumberIsClassifiedCorrectly() {
|
28
|
+
assertEquals(Classification.ABUNDANT, new NaturalNumber(12).getClassification());
|
29
|
+
}
|
30
|
+
|
31
|
+
@Ignore
|
32
|
+
@Test
|
33
|
+
public void testMediumAbundantNumberIsClassifiedCorrectly() {
|
34
|
+
assertEquals(Classification.ABUNDANT, new NaturalNumber(24).getClassification());
|
35
|
+
}
|
36
|
+
|
37
|
+
@Ignore
|
38
|
+
@Test
|
39
|
+
public void testLargeAbundantNumberIsClassifiedCorrectly() {
|
40
|
+
assertEquals(Classification.ABUNDANT, new NaturalNumber(33550335).getClassification());
|
41
|
+
}
|
42
|
+
|
43
|
+
@Ignore
|
44
|
+
@Test
|
45
|
+
public void testSmallDeficientNumberIsClassifiedCorrectly() {
|
46
|
+
assertEquals(Classification.DEFICIENT, new NaturalNumber(8).getClassification());
|
47
|
+
}
|
48
|
+
|
49
|
+
@Ignore
|
50
|
+
@Test
|
51
|
+
public void testMediumNumberIsClassifiedCorrectly() {
|
52
|
+
assertEquals(Classification.DEFICIENT, new NaturalNumber(31).getClassification());
|
53
|
+
}
|
54
|
+
|
55
|
+
@Ignore
|
56
|
+
@Test
|
57
|
+
public void testLargeDeficientNumberIsClassifiedCorrectly() {
|
58
|
+
assertEquals(Classification.DEFICIENT, new NaturalNumber(33550337).getClassification());
|
59
|
+
}
|
60
|
+
|
61
|
+
}
|
@@ -1,15 +1,79 @@
|
|
1
|
-
|
1
|
+
## Installing Lua
|
2
2
|
|
3
|
-
|
3
|
+
- [MacOS](#mac)
|
4
|
+
- [Ubuntu](#ubuntu)
|
5
|
+
- [Windows](#windows)
|
4
6
|
|
5
|
-
|
7
|
+
#### [MacOS](#mac)
|
6
8
|
|
7
|
-
|
9
|
+
First install Lua and [Luarocks][2] using [Homebrew][1]:
|
8
10
|
|
9
|
-
|
11
|
+
```shell
|
12
|
+
$ brew install lua
|
13
|
+
```
|
10
14
|
|
11
|
-
|
15
|
+
Then install the [Busted][3] testing framework for Lua:
|
16
|
+
|
17
|
+
```shell
|
18
|
+
$ luarocks install busted
|
19
|
+
```
|
20
|
+
|
21
|
+
Then run your tests:
|
22
|
+
|
23
|
+
```shell
|
24
|
+
$ busted .
|
25
|
+
```
|
26
|
+
|
27
|
+
#### [Ubuntu](#ubuntu)
|
28
|
+
|
29
|
+
First install Lua and [Luarocks][2] using [Apt][6]:
|
30
|
+
|
31
|
+
```shell
|
32
|
+
$ sudo apt-get install lua5.3 luarocks
|
33
|
+
```
|
34
|
+
|
35
|
+
Then install the [Busted][3] testing framework for Lua:
|
36
|
+
|
37
|
+
```shell
|
38
|
+
$ luarocks install busted
|
39
|
+
```
|
40
|
+
|
41
|
+
If this fails, you may need to use `sudo`:
|
42
|
+
|
43
|
+
```shell
|
44
|
+
$ sudo luarocks install busted
|
45
|
+
```
|
46
|
+
|
47
|
+
Then run your tests:
|
48
|
+
|
49
|
+
```shell
|
50
|
+
$ busted .
|
51
|
+
```
|
52
|
+
|
53
|
+
#### [Windows](#windows)
|
54
|
+
|
55
|
+
First install Lua and [Luarocks][2] using [Chocolatey][7]:
|
56
|
+
|
57
|
+
C:\> choco install lua
|
58
|
+
|
59
|
+
Then install the [Busted][3] testing framework for Lua:
|
60
|
+
|
61
|
+
C:\> luarocks install busted
|
62
|
+
|
63
|
+
Then run your tests:
|
64
|
+
|
65
|
+
C:\> busted .
|
12
66
|
|
13
67
|
[1]: http://brew.sh/
|
68
|
+
|
14
69
|
[2]: http://luarocks.org/
|
70
|
+
|
15
71
|
[3]: http://olivinelabs.com/busted/
|
72
|
+
|
73
|
+
[4]: https://github.com/Olivine-Labs/lua-style-guide
|
74
|
+
|
75
|
+
[5]: http://tylerneylon.com/a/learn-lua/
|
76
|
+
|
77
|
+
[6]: https://help.ubuntu.com/lts/serverguide/apt.html
|
78
|
+
|
79
|
+
[7]: http://chocolatey.org/
|
data/tracks/lua/docs/LEARNING.md
CHANGED
@@ -1 +1,5 @@
|
|
1
|
-
Lua is a very small language and you can [learn the basics of the language in 15 minutes]
|
1
|
+
Lua is a very small language and you can [learn the basics of the language in 15 minutes][1]. For an exhaustive look at the language, written by the authors of Lua, you can read [Programming in Lua][2] (the first edition which covers Lua 5.1 [is available online for free][3]).
|
2
|
+
|
3
|
+
[1]: http://tylerneylon.com/a/learn-lua/
|
4
|
+
[2]: http://www.lua.org/pil/
|
5
|
+
[3]: https://www.lua.org/pil/contents.html
|
@@ -1,11 +1,11 @@
|
|
1
1
|
There are many great free online resources for Lua including:
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
1. [lua.org][8]
|
4
|
+
2. A highly recommended detailed and authoritative introduction to all aspects of Lua programming by Lua's chief architect: [Programming in Lua, by Roberto Ierusalimschy][6]
|
5
|
+
3. For an official definition of the Lua language, consult the [Lua 5.1 Reference Manual][7], by R. Ierusalimschy, L. H. de Figueiredo, W. Celes.
|
6
|
+
4. [Lua Style Guide][4]
|
7
|
+
5. [Learn Lua in 15 minutes][5]
|
8
|
+
6. [Some][9] [options][10] [for][11] [linting][12]
|
9
9
|
|
10
10
|
[4]: https://github.com/Olivine-Labs/lua-style-guide
|
11
11
|
[5]: http://tylerneylon.com/a/learn-lua/
|
@@ -53,10 +53,6 @@ function board:empty_spaces()
|
|
53
53
|
end)
|
54
54
|
end
|
55
55
|
|
56
|
-
function board:__tostring()
|
57
|
-
return self.rep
|
58
|
-
end
|
59
|
-
|
60
56
|
local function transform(board)
|
61
57
|
local board = Board(board)
|
62
58
|
|
@@ -68,7 +64,7 @@ local function transform(board)
|
|
68
64
|
if mines > 0 then board:set(x, y, tostring(mines)) end
|
69
65
|
end
|
70
66
|
|
71
|
-
return
|
67
|
+
return board.rep
|
72
68
|
end
|
73
69
|
|
74
70
|
return {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.6.
|
4
|
+
version: 2.0.6.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -3955,6 +3955,12 @@ files:
|
|
3955
3955
|
- tracks/java/exercises/pascals-triangle/src/example/java/PascalsTriangle.java
|
3956
3956
|
- tracks/java/exercises/pascals-triangle/src/main/java/.keep
|
3957
3957
|
- tracks/java/exercises/pascals-triangle/src/test/java/PascalsTriangleTest.java
|
3958
|
+
- tracks/java/exercises/perfect-numbers/build.gradle
|
3959
|
+
- tracks/java/exercises/perfect-numbers/src/example/java/Classification.java
|
3960
|
+
- tracks/java/exercises/perfect-numbers/src/example/java/NaturalNumber.java
|
3961
|
+
- tracks/java/exercises/perfect-numbers/src/main/java/Classification.java
|
3962
|
+
- tracks/java/exercises/perfect-numbers/src/main/java/NaturalNumber.java
|
3963
|
+
- tracks/java/exercises/perfect-numbers/src/test/java/NaturalNumberTest.java
|
3958
3964
|
- tracks/java/exercises/phone-number/build.gradle
|
3959
3965
|
- tracks/java/exercises/phone-number/src/example/java/PhoneNumber.java
|
3960
3966
|
- tracks/java/exercises/phone-number/src/main/java/.keep
|