Implemented blurred flag feature

Vlad Rakhmanin requested to merge toadkarter/kgeography:blurred-flags into master

What does this merge request address?

This merge request relates to the Bug 457725, which suggested a new feature whereby certain flags with text on them can be blurred out, to make the flag guessing games more challenging. The flag should only be blurred in the guessing games, and in normal "browsing" mode the flag should remain unblurred.

How has the new functionality been implemented?

The map parser has been amended to now look for an additional division property entitled "blurredflag", which should contain a blurred variant of the flag. A new method has been added to the "division" class entitled "getFlagForQuestion", which returns a blurred flag if one is available. This method is now used in the flag guessing games.

How can I test out the new behaviour?

A sample blurred file and edited .xml file has been provided as a kind of demo, which blurs out one of the Australian flags. These are located in a new "blurred_demo" folder at the root of the directory, which I will delete before merging, as it is for demonstration only. To try it out, copy to the new .kgm and .png files to the directories listed in the Readme therein. You will see that the flag for the "Capital Territory" will only be blurred in the question modes.

Next steps

If these changes are fine from your perspective, then the next steps, which I would be happy to take responsibility for, will involve (a) adding to the documentation explaining how users can include blurred images in their own map files, and (b) blurring out any flags that have text on them. I would imagine that this list would be a good source for which flags would require blurred versions.

I am more than happy to make any changes and amendments, big or small, to this merge request, just let me know!

BUG: 457725

Merge request reports