pytron-web/views/index.pug

46 lines
2.0 KiB
Plaintext
Raw Normal View History

2019-03-20 16:52:01 +01:00
extends base
block content
section.section
.container
.columns.is-centered
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-narrow.is-hoverable
tr
th
for ai in ais
2019-03-20 17:13:06 +01:00
th.has-text-centered= ai.name
2019-03-20 16:52:01 +01:00
th.has-text-centered.has-text-success ✓
th.has-text-centered.has-text-danger ✗
for ai1 in ais
tr
2019-03-20 17:13:06 +01:00
th.has-text-centered= ai1.name
2019-03-20 16:52:01 +01:00
for ai2 in ais
2019-03-20 17:13:06 +01:00
if ai1.name == ai2.name
2019-03-20 16:52:01 +01:00
td
2019-03-20 17:13:06 +01:00
else if battles[ai1.name + "/" + ai2.name] > 50
td.has-text-success= battles[ai1.name + "/" + ai2.name]
else if battles[ai1.name + "/" + ai2.name] < 50
td.has-text-danger= battles[ai1.name + "/" + ai2.name]
2019-03-20 16:52:01 +01:00
else
2019-03-20 17:13:06 +01:00
td= battles[ai1.name + "/" + ai2.name]
2019-03-20 16:52:01 +01:00
td.has-text-centered
strong= 0
td.has-text-centered
strong= 0
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-hoverable
tr
th.has-text-centered AI
th.has-text-centered Score
2019-03-20 17:13:06 +01:00
for ai in sortedAis
2019-03-20 16:52:01 +01:00
tr
td.has-text-centered
2019-03-20 17:13:06 +01:00
strong= ai.name
2019-03-20 16:52:01 +01:00
td.has-text-centered
2019-03-20 17:13:06 +01:00
strong= ai.victories - ai.defeats
2019-03-20 16:52:01 +01:00