A simple API using dice in games