added tack change cost and extracted makeMove call from algorithms to main loop