get method
Implementation
PieceBuilder get(String notation) {
switch (notation) {
case 'K':
return K;
case 'Q':
return Q;
case 'B':
return B;
case 'N':
return N;
case 'R':
return R;
case 'P':
return P;
case 'k':
return k;
case 'q':
return q;
case 'b':
return b;
case 'n':
return n;
case 'r':
return r;
case 'p':
return p;
default:
throw Exception("Invalid piece notation: '" + notation + "'.");
}
}