made Attack namespace in js
move armies logic