refacted drawPiece
refactoring draw boxed pieces
refactored keyboard rotations. added where guards to foreach