diff options
Diffstat (limited to 'src/docs')
-rw-r--r-- | src/docs/dev.md | 87 |
1 files changed, 66 insertions, 21 deletions
diff --git a/src/docs/dev.md b/src/docs/dev.md index 2f3e3b5..5267bb7 100644 --- a/src/docs/dev.md +++ b/src/docs/dev.md | |||
@@ -1,7 +1,7 @@ | |||
1 | --- | 1 | --- |
2 | title: "BSc IN S5 / OOP with Java / Wall-J / Wall-J / Devel. notes" | 2 | title: "BSc IN S5 / OOP with Java / Wall-J / Wall-J / Devel. notes" |
3 | author: [Pacien TRAN-GIRARD, Adam NAILI] | 3 | author: [Pacien TRAN-GIRARD, Adam NAILI] |
4 | date: 2018-01-03 | 4 | date: 2018-01-14 |
5 | ... | 5 | ... |
6 | 6 | ||
7 | # Preamble | 7 | # Preamble |
@@ -10,7 +10,8 @@ date: 2018-01-03 | |||
10 | worlds. | 10 | worlds. |
11 | 11 | ||
12 | Being part of the "OOP with Java" course at [UPEM](http://www.u-pem.fr/), this application has been entirely | 12 | Being part of the "OOP with Java" course at [UPEM](http://www.u-pem.fr/), this application has been entirely |
13 | written in Java and makes use of the Zen5 and [JBox2D](http://www.jbox2d.org/) libraries. | 13 | written in Java and makes use of the Zen5, [JBox2D](http://www.jbox2d.org/) and |
14 | [JUnit5](http://junit.org/junit5/) libraries. | ||
14 | 15 | ||
15 | ## Licensing | 16 | ## Licensing |
16 | 17 | ||
@@ -26,45 +27,89 @@ Build-time and embedded run-time dependencies of this program are licensed under | |||
26 | 27 | ||
27 | ## Building the project | 28 | ## Building the project |
28 | 29 | ||
29 | TODO: | 30 | Compilation and production of the different output files is done through Ant and requires a JDK $\geq$ 8. |
31 | All the required dependencies of the program are shipped with the project archive, | ||
32 | as the use of Maven was not permitted. | ||
33 | |||
34 | Available Ant targets are: | ||
35 | |||
36 | - `compile`: compiles the Java sources | ||
37 | - `jar`: generates an autonomous executable Java Archive | ||
38 | - `javadoc`: generates the API documentation | ||
39 | - `clean`: deletes the generated resources | ||
40 | - `docs`: compiles the PDF reports (requires Pandoc and PlantUML) | ||
41 | - `zip`: generates the project archive file | ||
30 | 42 | ||
31 | - compilation done through ant | 43 | Unit tests can be executed through JUnitStarter, the JUnit Ant plugin not supporting JUnit 5. |
32 | - needs jdk >= 8 | ||
33 | - dependencies included in the jar | ||
34 | 44 | ||
35 | ## Running the program | 45 | ## Running the program |
36 | 46 | ||
37 | See the user manual. | 47 | _Refer to the user manual (user.pdf)._ |
38 | 48 | ||
39 | --- | 49 | \newpage |
40 | 50 | ||
41 | # Implementation details | 51 | # Considerations |
42 | 52 | ||
43 | ## Considerations | 53 | ## Specification refinement |
44 | 54 | ||
45 | ### Specification refinement | 55 | The initial specifications have been refined, defining unspecified and implied constraints. |
46 | 56 | ||
47 | TODO: | 57 | A _board_ or _world_ has been defined as a grid of blocks of the same size. |
58 | Their respective properties such as their traversability by the player have been detailed in the user manual. | ||
59 | |||
60 | Additional constraints on board validity have been added to ensure their correctness during their manipulation in the | ||
61 | program. Those conditions have been described in the user manual as well. | ||
62 | |||
63 | ## Unit testing | ||
64 | |||
65 | _"Sir, the testing?"_, Caroline reminds. | ||
66 | Most utility, logic functions and algorithms have been covered by automatic unit tests to reduce the risk of | ||
67 | small-but-yet-critical mistakes and regressions during the development. | ||
68 | Those automatic tests are ran with the help of the JUnit 5 test framework. | ||
69 | |||
70 | Components and modules related to the graphical user interface could not have been easily tested automatically. | ||
71 | Quality control of such parts of the program have been handled manually. | ||
72 | |||
73 | ## Architecture | ||
48 | 74 | ||
49 | - specs not clear in every possible way | 75 | The architecture of the program is loosely based on the _Model-View-Controller_ pattern, combined with an event-driven |
50 | - refined as such: world is made of tiles some of which defined traversable, defined coniditons of validity of a map | 76 | approach, separating state objects from actions and events handlers. |
51 | - see user manual | ||
52 | 77 | ||
53 | ### Unit testing | 78 | A more complete package and class diagram is attached to this report. |
54 | 79 | ||
55 | TODO: | 80 | TODO: |
56 | 81 | ||
57 | - tests are necessary | 82 | - include a simplified diagram here |
58 | - junit5, no ant plugin for this version, runs through the IDE | 83 | - explain event handling and propagation |
84 | - explain how it minimizes coupling | ||
85 | - explain how we can add stuff like a second robot and whatnot | ||
59 | 86 | ||
60 | ## Modules | 87 | ## Implementation details |
61 | 88 | ||
62 | TODO: | 89 | TODO: |
63 | 90 | ||
64 | - class diagram | 91 | - per-module remarks: |
65 | - package and class roles outline | 92 | - tell who did what in parallel |
93 | - using a ray tracer for explosions | ||
66 | 94 | ||
67 | ## Additional features | 95 | ## Additional features |
68 | 96 | ||
97 | None yet. | ||
98 | |||
69 | ## Notes | 99 | ## Notes |
70 | 100 | ||
101 | TODO: | ||
102 | |||
103 | - complain about Ant, beg for Gradle and dependency management | ||
104 | - check that zen5 is actually using a double buffer | ||
105 | - include git commit log? | ||
106 | |||
107 | --- | ||
108 | |||
109 | # References | ||
110 | |||
111 | TODO: | ||
112 | |||
113 | - jbox2d, zen5, jdk, ant, junit docs | ||
114 | - A* on wikipedia | ||
115 | - common sense | ||