D26549: clockgame multiple dataset

Johnny Jazeix noreply at phabricator.kde.org
Sun Jan 12 14:11:18 GMT 2020


jjazeix added inline comments.

INLINE COMMENTS

> Clockgame.qml:458
>  
> +        BarButton {
> +            id: okButton

it would be better to have the button on the right side else it may override with the clock

> clockgame.js:43
>      items.currentH = Math.floor(Math.random() * 12)
> -    items.targetH = Math.floor(Math.random() * 12)
> +    if(!items.levels[currentLevel].twentyfourHoursFormat) {
> +        minHours = 0

it would be easier to do :

  items.targetH = Math.floor(Math.random() * 12)
  if(!items.levels[currentLevel].twentyfourHoursFormat) {
      items.targetH += 12
  }

> clockgame.js:99
> +function checkAnswer() {
> +    if(items.targetH > 12) {
> +        if (items.currentH === (items.targetH - 12)

you don't need to duplicate all the function.
Something like:

  if (((items.currentH === items.targetH) || (items.currentH === (items.targetH - 12)))
                  && items.currentM === items.targetM
                  && items.currentS === items.targetS) {
              items.bonus.good("gnu")
          }
          else {
              items.bonus.bad("gnu")
          }

REPOSITORY
  R2 GCompris

REVISION DETAIL
  https://phabricator.kde.org/D26549

To: dekumar, jjazeix, echarruau, #gcompris_improvements, timotheegiet
Cc: kde-edu, sanjayshetty, parimalprasoon, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, andreask, rahulyadav, narvaez, scagarwal, apol, timotheegiet, jjazeix, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20200112/5fb49443/attachment.html>


More information about the kde-edu mailing list