farhanrahman / kyoto

18 stars 7 forks source link

Public cheaters map from monitor #94

Closed ChrisSSocha closed 12 years ago

ChrisSSocha commented 12 years ago

Feature to be added if we have time. Monitor should add a getCheaters(...) which returns a copy of the map to participates that request it (Suggest to make a copy of the Map, and return an Iterator)

cmd08 commented 12 years ago

How about an ImmutableMap? http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableMap.html

Then you can do getCheaters().containsKey("Country") to see if a specific country is a cheat without having to iterate over the whole map explicitly.

ChrisSSocha commented 12 years ago

Perhaps Collections.unmodifiableMap(/*map of cheaters*/) ??