(x: int, y: int)
| 334 | // Draws a 5*5 alignment pattern, with the center module |
| 335 | // at (x, y). All modules must be in bounds. |
| 336 | private drawAlignmentPattern(x: int, y: int): void { |
| 337 | for (let dy = -2; dy <= 2; dy++) { |
| 338 | for (let dx = -2; dx <= 2; dx++) |
| 339 | this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | // Sets the color of a module and marks it as a function module. |
| 344 | // Only used by the constructor. Coordinates must be in bounds. |
no test coverage detected