add canPlace
Change getLine' so that this function judges whether the input is correct.
So mainloop is changed so as not to check the correctness.
Add allIndices
add countEachPiece

return (num of white, num of black)