Adjusting the computation of a status for a game. Preferrably checking the status, only then the names.
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 23 Dec 2009 21:01:58 +0100
changeset 17375f006899f4e
parent 172 3de0568f7ee8
child 174 14f0ef3e09e0
Adjusting the computation of a status for a game. Preferrably checking the status, only then the names.
freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt
     1.1 --- a/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Wed Dec 23 20:45:19 2009 +0100
     1.2 +++ b/freemarkerdor/src/main/resources/cz/xelfi/quoridor/freemarkerdor/UI/game.fmt	Wed Dec 23 21:01:58 2009 +0100
     1.3 @@ -80,10 +80,17 @@
     1.4  
     1.5        <#macro status who>
     1.6            ${who?string}
     1.7 -          <#if who = doc.game.@currentPlayer>
     1.8 -              <#if doc.game.id.@status = "whiteWon" || doc.game.id.@status = "blackWon" >
     1.9 +          <#if who = doc.game.id.@white>
    1.10 +              <#if doc.game.id.@status = "whiteWon" >
    1.11                  - ${bundle.HAS_WON}
    1.12 -              <#else>
    1.13 +              <#elseif doc.game.id.@status = "whiteMove" && who = doc.game.@currentPlayer>
    1.14 +                - ${bundle.TO_MOVE}
    1.15 +              </#if>
    1.16 +          </#if>
    1.17 +          <#if who = doc.game.id.@black>
    1.18 +              <#if doc.game.id.@status = "blackWon" >
    1.19 +                - ${bundle.HAS_WON}
    1.20 +              <#elseif doc.game.id.@status = "blackMove" && who = doc.game.@currentPlayer>
    1.21                  - ${bundle.TO_MOVE}
    1.22                </#if>
    1.23            </#if>