Chess Material
[email protected] // 1.0 // type-checkable
Chess pieces are often considered to have a point value for roughly evaluating a position.
Write a function called material_count that takes a single string representing all the pieces
a player has (one character per piece) and returns their total material count.
The pieces with a point value are:
P(pawn): 1 pointB(bishop): 3 pointsN(knight): 3 pointsR(rook): 5 pointsQ(queen): 9 points
You may assume that there are no other letters in the string.
For example, given PNR you would return 9: 1 from the pawn, 3 from the knight, and 5 from the rook.