Expanded checkOverlap, improved comments and naming

- Made checkOverlap also detect all out-of-bounds piece placements, rather than only some. The increased detection is not necessary as the game is presently implemented but could be if the visual layout is changed. Its argument list is now very long, but little can be done to resolve this.
- Changed the names of many functions and variables dealing with the arrays of piece types to refer to "types" instead of "pieces", for clarity and consistency.