ryanb / ruby-warrior

Game written in Ruby for learning Ruby.
MIT License
3.83k stars 838 forks source link

Proxy objects for Turn and Space #23

Open ryanb opened 14 years ago

ryanb commented 14 years ago

All objects passed to a Player should be proxy objects which only contain methods that I want a player to use. This will make it more difficult to "cheat" by accessing the Space#unit and similar methods which provide more information than I want to make available.

This won't entirely prevent this kind of cheating but at least it will add a layer of difficulty. If one is smart enough to view the source and see how the proxying works then perhaps they deserve to have access to it. ;)