Library for playing optimal video poker