diff options
Diffstat (limited to 'lib/screens/random.js')
| -rw-r--r-- | lib/screens/random.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/screens/random.js b/lib/screens/random.js index 0cacea7..d5de257 100644 --- a/lib/screens/random.js +++ b/lib/screens/random.js @@ -8,22 +8,22 @@ */ module.exports = function (modulation, width, height, renderer) { - let response = ''; + let response = ''; - for (let i = 0; i < height; ++i) { - for (let j = 0; j < width; ++j) { - const red = Math.floor(Math.random() * 255); - const blue = Math.floor(Math.random() * 255); - const green = Math.floor(Math.random() * 255); + for (let i = 0; i < height; ++i) { + for (let j = 0; j < width; ++j) { + const red = Math.floor(Math.random() * 255); + const blue = Math.floor(Math.random() * 255); + const green = Math.floor(Math.random() * 255); - response = response + renderer(red, blue, green); - response = response + ' '; - } + response = response + renderer(red, blue, green); + response = response + ' '; + } - if (i < height - 1) { - response = response + '\n'; + if (i < height - 1) { + response = response + '\n'; + } } - } - return response; + return response; }; |