created a win condition method

in grid