pytron-web/views/index.pug

50 lines
2.3 KiB
Plaintext

extends base
block content
section.section
.container
if running
.columns.is-centered
.column.is-narrow.is-desktop
h5.title.is-5 Some battles are running...
.columns.is-centered
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-narrow.is-hoverable
tr
th
for ai in data.ais
th.has-text-centered= ai.name
for ai1 in data.ais
tr
th.has-text-centered= ai1.name
for ai2 in data.ais
if ai1.name == ai2.name
td
else if data.battles[ai1.name + "/" + ai2.name] > data.battles[ai2.name + "/" + ai1.name]
td.has-text-success= data.battles[ai1.name + "/" + ai2.name]
else if data.battles[ai1.name + "/" + ai2.name] < data.battles[ai2.name + "/" + ai1.name]
td.has-text-danger= data.battles[ai1.name + "/" + ai2.name]
else
td= data.battles[ai1.name + "/" + ai2.name]
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-hoverable
tr
th.has-text-centered AI
th.has-text-centered Victories
th.has-text-centered Nulls
th.has-text-centered Defeats
th.has-text-centered Score
for ai in data.sortedAis
tr
td.has-text-centered
strong= ai.name
td.has-text-centered= ai.victories
td.has-text-centered= ai.nulls
td.has-text-centered= ai.defeats
td.has-text-centered
strong= ai.score