Use function-level encapsulation instead of class-level encapsulation
to prevent the "return prisoners[i]" cheat.

Signed-off-by: Cyde Weys <cydeweys@gmail.com>