added loop in fight function and checked in console log