convert to functional object creation approach, instead of using prototype
convert Peg,Move objects to functional creation approach