added checkiftie function of the board, changed checkWin in the main file