Fix errors in legal move function, needs obstruction component, as well as more unit testing