Flipped the printing order
Fixed the validMove function