public int countBonusFromIngwer(GameBoard gb) throws Exception {
        int bonusCount = 0;
        try {
            bonusCount += getValue(gb, new Coordinates(1, 1));
            bonusCount += getValue(gb, new Coordinates(boardSize, 1));
            bonusCount += getValue(gb, new Coordinates(1, boardSize));
            bonusCount += getValue(gb, new Coordinates(boardSize, boardSize));
            bonusCount *= cornerBonus;

            int edgebonus = 0;
            int val = 0;
            for (int x = 1; x <= boardSize; x++) {
                val = getValue(gb, new Coordinates(x, 1));
                if (val > 0) {
                    edgebonus++;
                }
                val = getValue(gb, new Coordinates(x, boardSize));
                if (val > 0) {
                    edgebonus++;
                }
                val = getValue(gb, new Coordinates(1, x));
                if (val > 0) {
                    edgebonus++;
                }
                val = getValue(gb, new Coordinates(boardSize, x));
                if (val > 0) {
                    edgebonus++;
                }
            }

            bonusCount += edgebonus;
        } catch (Exception e) {
        }

        return bonusCount;
    }