public int getValue() {
		int value = 0;
		int factor;

		for (Piece p: pieces) {
			if (p.getPlayer() == 1) factor = 1;
			else factor = -1;

			switch (p.getType()) {
			case PAWN:
				value += factor;
				break;
			case KNIGHT:
				value += 3 * factor;
				break;
			case BISHOP:
				value += 3 * factor;
				break;
			case ROOK:
				value += 5 * factor;
				break;
			case QUEEN:
				value += 9 * factor;
				break;
			default:
				break;
			}
		}
		
		return value;
	}