Open source examples of common game-related functions in Java