RParkerM / PuzzMatch

Simple puzzle game written with HTML5 and Javascript
0 stars 0 forks source link

Restructure Puzzle Objects code... Too much stuff in Board #3

Open RParkerM opened 8 years ago

RParkerM commented 8 years ago

Possibly move Block and Chain outside of the Board declaration. Although we do not need to use Block and Chain definitions outside of the board, including them inside seems to create clutter which is unneeded, as well as possibly including some possible scoping problems which may be difficult to debug.

RParkerM commented 8 years ago

currently block's draw method refers to tileImage in it's parent Board

RParkerM commented 8 years ago

chain doesn't seem to rely on any functionality in board

RParkerM commented 8 years ago

instead of declaring functions inside constructors, you should add them to the prototype. Maybe not, due to using private variables inside of these functions