Neat! The actual COBOL is pretty minimal, just tracking where the balls and paddles are and then calling out to update the DOM. It doesn't look anywhere near as horrific as I would have expected :)
My take is that people who fear COBOL probably haven't seen pre-ES5[0] JavaScript.
[0] While ES2015 was a major leap in and of itself, it wouldn't have happened had ES5 not laid the groundwork by introducing "minor improvements" that we now take for granted like JSON, strict mode and Function.prototype.bind to name a few.
My first reaction was that this must have been some kind of plot to make young people interested in COBOL using the type of games the current demographic of this language knows best.
This is sweet! Interestingly it seems to only accept QWERTY input even when the keyboard has an alternate mapping set. This makes sense though given the positions of the keys chosen
The ball doesn't seem to bounce "properly" - i.e. upwards if it lands towards the top of the paddle and downwards if it lands towards the bottom of the paddle.
The existing mapping is ridiculous. A,D,J,L are all in a horizontal line, but are mapped to vertical motions.
There are many choices, but for example, using A/Z for left player up/down and J/M for right player up down would not require any mental work. Once you place your fingers, up is up and down is down.
https://github.com/moxon6/cobol-js-emscripten/blob/master/co...