Chapter 14 . A Simple Game


Chapter 14. A Simple Game

Exercise 60. Smells
  • The board is represented as a StringBuffer; it could be a new class.

  • It might make sense to have a Player class.

  • There are a lot of magic numbers .

  • There are several complicated if statements.

  • There's a lot of duplication ”note the winner calculation in particular.

  • See also Exercise 61.




Refactoring Workbook
Refactoring Workbook
ISBN: 0321109295
EAN: 2147483647
Year: 2003
Pages: 146

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net