pytron-web/views/index.pug

46 lines
2.0 KiB
Plaintext

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
th.has-text-centered= ai.name
th.has-text-centered.has-text-success ✓
th.has-text-centered.has-text-danger ✗
for ai1 in ais
tr
th.has-text-centered= ai1.name
for ai2 in ais
if ai1.name == ai2.name
td
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]
else
td= battles[ai1.name + "/" + ai2.name]
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
for ai in sortedAis
tr
td.has-text-centered
strong= ai.name
td.has-text-centered
strong= ai.victories - ai.defeats