Implement Point
so that:
new Point( new Point(10, 20) + new Point(30, 50) ).toString() === '{40,70}'
Must be generic and be able to handle x
and y
values from 0..999 (integers only)
Minor hint: you'll need to implement valueOf
and toString
methods.
bit shifting: https://gist.github.com/3135051