Added comments. Added loop for attack array, making the code a bit more
flexible.