Tarot game: score calculation

- plugin tarot: score validity is now checked (some of attackers and defender must equal 91)
- plugin tarot: new signal tarotGameScore to give the scores and winners/loosers
- wix: score are now displayed at the end of the game
- xml_tools: 'fixed' type is now managed in dataForm2xml
This commit is contained in:
Goffi 2010-06-02 15:57:23 +09:30
commit 1a9f7e8396

View file

@ -46,7 +46,9 @@ class XMLTools:
elem.appendChild(text)
top_element.appendChild(elem)
for field in form.fieldList:
if field.fieldType == 'text-single':
if field.fieldType == 'fixed':
__field_type = 'text'
elif field.fieldType == 'text-single':
__field_type = "string"
elif field.fieldType == 'text-private':
__field_type = "password"
@ -57,7 +59,8 @@ class XMLTools:
__field_type = "string"
elem = doc.createElement('elem')
elem.setAttribute('name', field.var)
if field.var:
elem.setAttribute('name', field.var)
elem.setAttribute('type', __field_type)
elem.setAttribute('label', field.label or "")
if field.value: