pytron-web/views/index.pug

49 lines
2.2 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
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-26 12:24:36 +01:00
else if battles[ai1.name + "/" + ai2.name] > battles[ai2.name + "/" + ai1.name]
2019-03-20 17:13:06 +01:00
td.has-text-success= battles[ai1.name + "/" + ai2.name]
2019-03-26 12:24:36 +01:00
else if battles[ai1.name + "/" + ai2.name] < battles[ai2.name + "/" + ai1.name]
2019-03-20 17:13:06 +01:00
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
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-hoverable
tr
th.has-text-centered AI
2019-03-26 12:24:36 +01:00
th.has-text-centered Victories
th.has-text-centered Nulls
th.has-text-centered Defeats
2019-03-20 16:52:01 +01:00
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-26 12:24:36 +01:00
strong= ai.victories
td.has-text-centered
strong= ai.nulls
td.has-text-centered
strong= ai.defeats
td.has-text-centered
strong= ai.score
2019-03-20 16:52:01 +01:00