I use templates. I think right way is see flags in c_move function.