add attack parameter
make move and attack function