finished isvalidmove. little messy right now but ill break it down into methods eventually.