finished isvalidmove and generateallpossiblemoves

not sure if they work completely though since i havent tested them.