currentBoardState function added.