DEV Community

Discussion on: Do you think functional code readable ?

 
voanhcuoc profile image
Khoa Che

:)

const loop = _.range;

loop(n).forEach(() => {
  random_move(board)
});

It shouldn't choose a move and execute it; it should just choose a move. The shuffle function body is the place where you should call process_move.

Oh yes. Thank you!