public char getWinner() 
    {
	char result;
	
	if(gameOver)
	    return winner;
	int blackCount=0;
	int whiteCount=0;
	if(surrendering){
	    for(char c : grid)
		{
		    if(c=='B')
			blackCount++;
		    if(c=='W')
			whiteCount++;
		}
	    if(blackCount>whiteCount)
		setWinner('B');
	    else if(whiteCount>blackCount)
		setWinner('W');
	    else
		setWinner(' ');
	}
	return winner;
    }