1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@ -492,7 +492,7 @@ fn (mut app App) ai_move() {
bestprediction = predictions[move_idx]
}
}
eprintln('Simulation time: ${think_time:4}ms | best $bestprediction')
eprintln('Simulation time: ${think_time:4}ms | best ${bestprediction}')
app.move(bestprediction.move)
}
@ -613,8 +613,8 @@ fn (app &App) draw() {
app.gg.draw_text(ww / 2, (m * 8 / 10) + ypad, msg2, app.label_format(.score_end))
}
// Draw at the end, so that it's on top of the victory / game over overlays
app.gg.draw_text(labelx, labely, 'Points: $app.board.points', app.label_format(.points))
app.gg.draw_text(ww - labelx, labely, 'Moves: $app.moves', app.label_format(.moves))
app.gg.draw_text(labelx, labely, 'Points: ${app.board.points}', app.label_format(.points))
app.gg.draw_text(ww - labelx, labely, 'Moves: ${app.moves}', app.label_format(.moves))
}
fn (app &App) draw_tiles() {
@ -654,13 +654,13 @@ fn (app &App) draw_tiles() {
app.gg.draw_text(xpos, ypos, '${1 << tidx}', fmt)
}
.log {
app.gg.draw_text(xpos, ypos, '$tidx', fmt)
app.gg.draw_text(xpos, ypos, '${tidx}', fmt)
}
.exponent {
app.gg.draw_text(xpos, ypos, '2', fmt)
fs2 := int(f32(fmt.size) * 0.67)
app.gg.draw_text(xpos + app.ui.tile_size / 10, ypos - app.ui.tile_size / 8,
'$tidx', gx.TextCfg{
'${tidx}', gx.TextCfg{
...fmt
size: fs2
align: gx.HorizontalAlign.left