Closed nskins closed 7 years ago
Would it be a better idea to use Marshal.load(Marshal.dump(object)
rather than writing something similar to Monster's clone method? https://github.com/nskins/goby/blob/46df10e8e2745235d5fa819a39e43c8167e28ab9/lib/Entity/Monster/monster.rb#L49
Hey @shyam12860. I'm not sure; I haven't used Marshal
before. I will look into it when I can. Feel free to try it out, and I'd be a happy to do a code review.
Hey @nskins, sorry about the first 2 commits! There was an issue with rebasing, but I've fixed and removed them, though it still shows up here. The last one is the right one.
Override the
clone
method for Tile so that it creates a deep copy. Write a test or two to ensure the proper behavior.