Horse racing: Difference between revisions
→{{header|Wren}}: Eliminated a variable.
(→{{header|Wren}}: Can now deal with a multiple dead-heat.) |
(→{{header|Wren}}: Eliminated a variable.) |
||
Line 129:
System.print("Race 4\n")
System.print("Pos Horse Weight Dist Sex")
var pos = ""
for (x in 0...l.count) {
var wt = l[x].value[1] ? "9.00" : "8.11"
var dist = 0
if (
pos = (
var sx = l[x].value[1] ? "colt" : "filly"
Fmt.print("$-2s $s $s $3.1f $s", pos, l[x].key, wt, dist, sx)
}
|