CaptainStack/ChessScouter — pull request #17 by pabrams (2013-08-29 20:04:36+00:00)
Title: Issues 8 and 16:  Add feature to Input FEN  and Refactor pieces to inherit from abstract superclass Piece.js

I started this PR with the intention of adding a feature to input FEN, but when I looked at it I found I also wanted to implement Issue#8 to refactor pieces to inherit from an abstract superclass.

The comparison will look like all code has changed because I also fixed the formatting of the indents; sorry about that, I probably should have done that in a separate PR.

Summary of changes:
- Add class Piece as superclass of Knight, Bishop, etc.
- Move common code from the piece classes into class Piece.
- Replace constructors for each of the piece classes.
- Replace most properties of class Piece with methods, and update all references to those properties with method calls.
- Add class Fen
- Replace most tabs with two spaces, and most 4-space indentations with 2 spaces (sorry that the diffs will look huge now, but the indents were all crazy)
- Add a lot of semicolons.