zond / android-diplicity

Android client for the diplicity service.
https://diplicity-engine.appspot.com/
GNU General Public License v3.0
9 stars 8 forks source link

Generated game name #53

Closed tttppp closed 7 years ago

tttppp commented 7 years ago

Fixes #48.

Assuming the user doesn't enter a game name then this makes one for them. It uses the form "The [battle] for the [adjective] [prize]" where [battle] indicates the phase length, [adjective] indicates some other defining game setting and [prize] is just a random noun.

I'm unable to test the final code, but I did test it with some workarounds (see the "hacks" commit and revert). I'm happy to rebase to remove the hacks from the commit history if you're bothered by it. I thought I might want to use the same workaround again in future.

zond commented 7 years ago

I'm only able to look at this on a phone, and am unable to get a proper sense for what the hacky workaround actually did. Since you removed it it doesn't really matter, but could you describe it just to sate my curiosity? :)

Other than that it looks good. Merge when happy!

When the auto build produces a new version, you can test it yourself, and if you like it I can push it to Play Store.

tttppp commented 7 years ago

The hacks were all around not loading the user stats from the server. This doesn't work with fake users (I think it needs access to the Google identity service?) and I couldn't use the real Diplicity URL (as I don't have the application key).

The easiest option was to use the real server, but ignore any errors, so I also had to hard code a list of variants. GitHub displays far more diff for that commit than there actually is, because I also changed the indentation. With a decent diff viewer it looks a lot more sane.

I didn't realise I can download the apk from CircleCI (you have to have an account with them to do so). I've done that now and will try testing it!

tttppp commented 7 years ago

Hooray! It works. Testing using the release APK makes things a lot easier. Please push to the Play Store when ready - thanks!

zond commented 7 years ago

Ok, I'll push!

Note that it's definitely intended for fake users to be able to do everything real users can - otherwise testing with them is too hard. So a patch that makes fake users work properly in a way that conforms work how fake users are otherwise treated would be a good thing :)

zond commented 7 years ago

Ok, rollout is started!

zond commented 7 years ago

Aaand it's live!

tttppp commented 7 years ago

Ok, I'll have to reproduce and put the stack trace in an issue. I remember seeing a problem with null in a url where it's expecting the user id.

Thanks for putting it live!

zond commented 7 years ago

Cool! Thanks for adding stuff!