Update bfckd.cpp

Replace long if statement with switch.