@@ -0,0 +1,2725 @@
+package ru.szhernovoy.view;%0A%0A/**%0A * Created by Sergey on 17.09.2016.%0A */%0A%0Apublic class TicTacToe %7B%0A%0A    private final int%5B%5D%5B%5D values;%0A%0A    public TicTacToe(final int%5B%5D%5B%5D values) %7B%0A        this.values = values;%0A    %7D%0A%0A    public boolean hasWinner() %7B%0A%0A        int %5B%5D xyLine = new int%5B%5D%7B-1, -1%7D;%0A        int %5B%5D xyColumne = new int%5B%5D%7B-1, -1%7D;%0A        int %5B%5D xyDiagonal = new int%5B%5D%7B-1, -1%7D;%0A        int %5B%5D xyDiagonalL = new int%5B%5D%7B-1, -1%7D;%0A%0A%0A%0A        int accumaleteLine = 0;%0A        int accumaleteColumne = 0;%0A        int accumaleteDiagonal = 0;%0A        int accumaleteDiagonalL = 0;%0A%0A%0A        //up - down ; left - rigth%0A        for(int i = 0, k =0, v = this.Board.length -1 ; i %3C this.Board.length;i++, k++,v--)%7B%0A%0A            /**%0A             * Calculate diagonal left to right%0A             */%0A%0A            if(this.Board%5Bi%5D%5Bk%5D == symbol)%7B%0A                accumaleteDiagonal++;%0A            %7D%0A            else%7B%0A                xyDiagonal%5B0%5D = i;%0A                xyDiagonal%5B1%5D = k;%0A            %7D%0A%0A            /**%0A             * Calculate diagonal right to left%0A             */%0A            if(this.Board%5Bi%5D%5Bv%5D == symbol)%7B%0A                accumaleteDiagonalL++;%0A            %7D%0A            else%7B%0A                xyDiagonalL%5B0%5D = i;%0A                xyDiagonalL%5B1%5D = v;%0A            %7D%0A%0A%0A            for(int j = 0; j %3C this.Board.length;j++)%7B%0A                /**%0A                 * Calculate line%0A                 */%0A                if(this.Board%5Bi%5D%5Bj%5D == symbol)%7B%0A                    accumaleteLine++;%0A                %7D%0A                else%7B%0A                    xyLine%5B0%5D = i;%0A                    xyLine%5B1%5D = j;%0A                %7D%0A%0A                /**%0A                 * Calculate column%0A                 */%0A                if(this.Board%5Bj%5D%5Bi%5D == symbol)%7B%0A                    accumaleteColumne++;%0A                %7D%0A                else%7B%0A                    xyColumne%5B0%5D = j;%0A                    xyColumne%5B1%5D = i;%0A                %7D%0A            %7D%0A%0A            if(accumaleteLine == 2  )%7B%0A                xy = xyLine;%0A                break;%0A            %7D%0A            else%7B%0A                xyLine%5B0%5D = -1;%0A                xyLine%5B1%5D = -1;%0A                accumaleteLine = 0;%0A            %7D%0A%0A            if(accumaleteColumne == 2  )%7B%0A                xy = xyColumne;%0A                break;%0A            %7D%0A            else%7B%0A                xyColumne%5B0%5D = -1;%0A                xyColumne%5B1%5D = -1;%0A                accumaleteColumne = 0;%0A            %7D%0A        %7D%0A%0A        if(xy%5B0%5D == -1 && xy%5B1%5D ==-1 )%7B%0A            if(accumaleteDiagonal == 2  )%7B%0A                xy = xyDiagonal;%0A            %7D%0A%0A            if(accumaleteDiagonalL == 2  )%7B%0A                xy = xyDiagonalL;%0A            %7D%0A        %7D%0A%0A        throw new UnsupportedOperationException();%0A    %7D%0A%7D%0A%0A

update map , without override Euqals HashCod