getPlace method

dynamic getPlace(
  1. dynamic piece,
  2. dynamic pos,
  3. List<String> arrangement
)

Implementation

dynamic getPlace(piece, pos, List<String> arrangement) {
  String square = arrangement.where((e) => FischerRandomValidators().isStringInteger(e)).toList()[pos];
  arrangement[int.parse(square)] = piece;
  return arrangement;
}