Share Rank and File logic. Ensure duplicate instances of File, Rank and Square cannot be instantiated.
Fixed the random-game script.
Move partial functions take the piece type to prevent bugs like a white king moving the the a rank and getting promoted or a rook getting castled with the other rook! Fixed the simple-examples script.