private void checkFinished() {
		int[] sums = new int[8];
		
		// Sum rows, columns and diagonals
		sums[0] = this.board[0] + this.board[1] + this.board[2];
		sums[1] = this.board[3] + this.board[4] + this.board[5];
		sums[2] = this.board[6] + this.board[7] + this.board[8];
		
		sums[3] = this.board[0] + this.board[3] + this.board[6];
		sums[4] = this.board[1] + this.board[4] + this.board[7];
		sums[5] = this.board[2] + this.board[5] + this.board[8];
		
		sums[6] = this.board[0] + this.board[4] + this.board[8];
		sums[7] = this.board[6] + this.board[4] + this.board[2];
		
		// Check for a victory
		int winningSum = 0;
		for (int i : sums) {
			if ((i == 3) || (i == -3)) winningSum = i;
		}
		
		// Declare Victory
		if (winningSum == 3) {
			// Player 2 wins
			this.gameOver = true;
			this.winner = 2;
		}
		else if (winningSum == -3) {
			// Player 1 wins
			this.gameOver = true;
			this.winner = 1;
		}
		else { // Check for tie
			boolean foundBlank = false;
			for (int i : this.board) {
				if (i == 0) foundBlank = true;
			}
			
			if (!foundBlank) {
				// End game but do not set a winner
				this.gameOver = true;
			}
		}
	}