If it's a flash game, my bet would be to use a proxy (google burp) to intercept app < - > server communications. Then you can code a client for the game using the gathered informations.
Also, these kind of things are easier to code using a scripting language, python by example.. It could be a good occasion to learn it.