added swap function. swap 1 and 2 if board has odd numbers