GSoC/GCI Archive
Google Code-in 2014 KDE

Marble: Add a visual element to show score in "Identify the country flag" game

completed by: Daniel Pastushchak

mentors: Dennis Nienhüser, Abhinav Gangwar, Torsten Rahn, shentey

In the last task http://www.google-melange.com/gci/task/view/google/gci2014/5300608940638208 , You saw that in game "Identify the flag" the score is shown as "RightAnswers/TotalQuestions". The is about adding an additional visual to show the score.

- See the file "src/examples/cpp/marble-game/CountryByFlag.qml" . It contains the code for the GUI shown for the "Identify the flag" game.

- You need to add a fill diagram gives the visual representation of the score ( RightAnswers/TotalQuestions ).

- Draw two rectangles side by side with different colors. The width of left rectangle should vary to show the score like

                 (WidthLeft) / (WidthLeft+WidthRight) = (RightAnswers) / (TotalQuestions)

WidthLeft = width of left rectangle 

WidthRight = width of right rectangle

It looks something like :

                                   [IMAGE https://lh3.googleusercontent.com/xRjaVHNu1YSXNvS6O5nnVLE3JHfVkCcyyhxfsb-gjqBUW_jUGKRoDlnMwCp9aZy8PevP=w1345-h543]

- Then add a NumberAnimation to animate the change in width of rectangles