help functions for generating next boards and positions