Commit Graph

59 Commits

Author SHA1 Message Date
Arne Keller
938ace5a5b SonarQube 2020-02-20 08:36:35 +01:00
Arne Keller
aa8f43b251 Checkstyle and SonarQube 2020-02-19 23:54:33 +01:00
Arne Keller
c40e635cb8 Checkstyle 2020-02-19 23:18:14 +01:00
Arne Keller
931ff805a9 Store available commands in map 2020-02-19 23:09:43 +01:00
Arne Keller
8803aab42a Checkstyle 2020-02-19 19:32:35 +01:00
Arne Keller
1f3802d380 Refactor command parsing 2020-02-19 19:28:06 +01:00
Arne Keller
7e39a97dd4 Checkstyle 2020-02-19 18:49:18 +01:00
Arne Keller
5b9f9b8da7 Checkstyle 2020-02-19 18:47:00 +01:00
Arne Keller
33138162fb Refactor coach as an abstract class 2020-02-19 18:44:25 +01:00
Arne Keller
8811dcf228 Fix placing trains 2020-02-19 18:40:43 +01:00
Arne Keller
e8a2a28aa8 Checkstyle 2020-02-19 18:30:40 +01:00
Arne Keller
b17e8db22f Checkstyle 2020-02-19 18:13:22 +01:00
Arne Keller
24919ac07c Correctly print electrical engines 2020-02-19 10:20:59 +01:00
Arne Keller
2e336a9bcb Correctly crash touching trains 2020-02-19 10:14:02 +01:00
Arne Keller
43ee608975 Checkstyle 2020-02-19 10:13:44 +01:00
Arne Keller
0ff7d6e300 Remove not needed pattern 2020-02-19 08:57:18 +01:00
Arne Keller
be6bc87b58 Modularize command patterns 2020-02-19 08:55:36 +01:00
Arne Keller
ba6a939a92 Only place trains if all switches are set 2020-02-19 08:37:36 +01:00
Arne Keller
6e62cdb6e0 Correctly handle unicode names 2020-02-19 08:23:35 +01:00
Arne Keller
7e28bdc446 Checkstyle 2020-02-18 20:47:51 +01:00
Arne Keller
137b8359c6 Checkstyle 2020-02-18 19:18:04 +01:00
Arne Keller
2125588a0d Increase test coverage and tweak error messages 2020-02-18 18:11:40 +01:00
Arne Keller
71fb077c7a Increase test coverage and change error message wording 2020-02-18 15:57:04 +01:00
Arne Keller
cc4a247fec Add lots of tests for error messages 2020-02-18 15:03:48 +01:00
Arne Keller
618cee8e70 Do not print derailed trains when setting switch 2020-02-18 14:50:01 +01:00
Arne Keller
fa62ba267f Actually remove crashed trains 2020-02-18 14:40:21 +01:00
Arne Keller
302b755ee6 Correctly handle crashes of more than two trains 2020-02-18 14:35:39 +01:00
Arne Keller
16ddc708ef Add more tests and change error wording and simplify train coupling logic 2020-02-18 14:19:45 +01:00
Arne Keller
dab2f23e82 Correctly derail trains on switches 2020-02-18 09:47:36 +01:00
Arne Keller
25d7ba0dce Correctly handle long tracks and trains 2020-02-17 20:39:30 +01:00
Arne Keller
e41badefd9 Use a map for storing trains 2020-02-17 14:11:55 +01:00
Arne Keller
bb9d014508 Checkstyle 2020-02-17 13:59:42 +01:00
Arne Keller
efcd3a721b Make Command an abstract class 2020-02-17 12:33:26 +01:00
Arne Keller
fbf80103be Checkstyle 2020-02-17 11:19:56 +01:00
Arne Keller
3f1594263e Checkstyle 2020-02-17 11:00:15 +01:00
Arne Keller
cdc71c8253 Checkstyle 2020-02-17 10:39:26 +01:00
Arne Keller
48b4562bde Checkstyle 2020-02-17 10:14:19 +01:00
Arne Keller
4d23894509 Add more tests 2020-02-17 09:46:00 +01:00
Arne Keller
2746b9e7cf Correctly handle placing already placed trains and correctly handle small trains on larger rails 2020-02-17 09:43:54 +01:00
Arne Keller
9191028934 Correctly derail 2020-02-16 19:42:27 +01:00
Arne Keller
fdedb5e001 Fix NPE 2020-02-16 19:21:07 +01:00
Arne Keller
4ffb3a5665 Refactor rail network in own class 2020-02-16 16:38:25 +01:00
Arne Keller
a84cb80288 Fix compile error 2020-02-16 16:25:19 +01:00
Arne Keller
07bc781c3d Skip comments instead of exiting 2020-02-16 16:25:01 +01:00
Arne Keller
9aa8cc2384 Reorganize code 2020-02-16 15:01:33 +01:00
Arne Keller
bfccc89237 Checkstyle 2020-02-16 14:57:54 +01:00
Arne Keller
d446628f35 Checkstyle 2020-02-15 17:53:19 +01:00
Arne Keller
3610cfac8d Checkstyle 2020-02-15 17:33:08 +01:00
Arne Keller
b24b7cd83f Make command an interface 2020-02-15 16:51:34 +01:00
Arne Keller
972000204f Checkstyle 2020-02-15 16:38:54 +01:00