Numerical experiments on flapping foils mimicking fish-like locomotion