generalized makeMove()