Commit b330acb
authored
Scoring (#5)
* slightly cleaning up GameState impl to move all non-pub funcs to the bottom
* first refactor step. Hide old methods which exposed the implementation detail that there were discrete settled blocks vs just a collection of settled pieces which might no longer consistently stay in the same shape
* all tests are passing again after first refactor
* removed cell in favor of just reusing vec2
* render the active piece again
* rendering each individual block again
* there is now some distinction between settled blocks and the active block and tests are passing
* get rid of stale todos
* get rid of one more stale TODO
* hey look some basic scoring! but oops I forgot to drop the blocks after clearing the rows
* YOOOOOO I can clear and multi clear :)
* added some test reminder
* display the score
* added a new failing score test
* first score test passing others failing
* all tests passing
* a little bit of refactoring
* refactored so that a block's position is implicit in its representation in the array
* add scoring
* quick ws fix1 parent a4b66f2 commit b330acb
7 files changed
+641
-296
lines changedLoading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | | - | |
79 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
39 | | - | |
| 33 | + | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
| |||
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | | - | |
| 81 | + | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
| |||
190 | 184 | | |
191 | 185 | | |
192 | 186 | | |
193 | | - | |
| 187 | + | |
194 | 188 | | |
195 | 189 | | |
196 | 190 | | |
| |||
263 | 257 | | |
264 | 258 | | |
265 | 259 | | |
266 | | - | |
267 | 260 | | |
268 | 261 | | |
269 | 262 | | |
270 | 263 | | |
271 | 264 | | |
272 | | - | |
273 | 265 | | |
274 | 266 | | |
275 | 267 | | |
276 | 268 | | |
277 | 269 | | |
278 | | - | |
279 | 270 | | |
280 | 271 | | |
281 | 272 | | |
282 | 273 | | |
283 | 274 | | |
284 | 275 | | |
285 | 276 | | |
286 | | - | |
287 | 277 | | |
288 | 278 | | |
289 | 279 | | |
| |||
0 commit comments