New graphics code for new piece state.
Change toInteger to parseInt