[#21] modify isWin() method

add win condition code.