implicit address-taking for array slices
This commit is contained in:
+2
-2
@@ -71,14 +71,14 @@ main :: func() i32 {
|
||||
Player { id = PlayerID(4), name = "Grace", tier = .gold, score = 33, streak = 5, active = true },
|
||||
]
|
||||
|
||||
apply_decay((&players)[..])
|
||||
apply_decay(players[..])
|
||||
|
||||
for (&players) |@player, index| {
|
||||
score :: projected_score(player^)
|
||||
_ = printf("%d: %s projected=%d\n", index, player.name, score)
|
||||
}
|
||||
|
||||
if best_player((&players)[..]) |winner : projected_score(winner^) >= 80| {
|
||||
if best_player(players[..]) |winner : projected_score(winner^) >= 80| {
|
||||
_ = printf("winner: %s\n", winner.name)
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user