Update entities.js

Added swing boolean parameter.
function attack(target, swing)
Update entities.js

Added swing parameter to attack function.
Fixed indentation.
Merge pull request #160 from pratham2003/master

Added boolean swing arm parameter to attack