dicewarsjs
dicewarsjs copied to clipboard
Can I raise a pull request for UI changes/functionality/Code readability?
Hello, I love this game. There are two features that I've really wanted (which I've implemented locally). Firstly, the ability to change gameplay speed, especially at the start of games. I've added a control to change the speed during the game. The second feature is the ability to see whose turn it is at all times. At the moment it flickers in and out of view while the AI is doing its thing. I've moved it to the left hand side vertically.
The only other thing is that the code was not very readable to me initially, and I've changed a bunch of variable names. Just as an example:
var o = spr[sn_battle].getChildByName("d"+bturn+i);
is now:
var DiceRollSpr = sprites[sn_battle].getChildByName("d" + turn+ i);
There is no way to see what var "o" is without digging, but if it's got a descriptive name it's easier to work with.