A small engine for a game in java