my implementation of coin strategy game using DP