@@ -11,36 +11,36 @@ import (
1111
1212func DrawScore (win * pixelgl.Window , score int ) {
1313 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
14- basicTxt := text .New (pixel .V (920 , 685 ), basicAtlas )
14+ txt := text .New (pixel .V (920 , 685 ), basicAtlas )
1515
16- fmt .Fprintf (basicTxt , "Score : %06d" , score )
16+ fmt .Fprintf (txt , "Score : %06d" , score )
1717
18- basicTxt .Draw (win , pixel .IM )
18+ txt .Draw (win , pixel .IM )
1919}
2020
2121func DrawStepNumber (win * pixelgl.Window , step int ) {
2222 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
23- basicTxt := text .New (pixel .V (920 , 700 ), basicAtlas )
23+ txt := text .New (pixel .V (920 , 700 ), basicAtlas )
2424
25- fmt .Fprintf (basicTxt , "Step : %06d" , step )
25+ fmt .Fprintf (txt , "Step : %06d" , step )
2626
27- basicTxt .Draw (win , pixel .IM )
27+ txt .Draw (win , pixel .IM )
2828}
2929
3030func DrawNumberOfVehicles (win * pixelgl.Window , numberOfVehicles int ) {
3131 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
32- basicTxt := text .New (pixel .V (850 , 670 ), basicAtlas )
32+ txt := text .New (pixel .V (850 , 670 ), basicAtlas )
3333
34- fmt .Fprintf (basicTxt , "Number of cars : %04d" , numberOfVehicles )
34+ fmt .Fprintf (txt , "Number of cars : %04d" , numberOfVehicles )
3535
36- basicTxt .Draw (win , pixel .IM )
36+ txt .Draw (win , pixel .IM )
3737}
3838
3939func DrawNumberOfTrips (win * pixelgl.Window , numberOfTrips int ) {
4040 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
41- basicTxt := text .New (pixel .V (850 , 655 ), basicAtlas )
41+ txt := text .New (pixel .V (850 , 655 ), basicAtlas )
4242
43- fmt .Fprintf (basicTxt , "Number of trips : %04d" , numberOfTrips )
43+ fmt .Fprintf (txt , "Number of trips : %04d" , numberOfTrips )
4444
45- basicTxt .Draw (win , pixel .IM )
45+ txt .Draw (win , pixel .IM )
4646}
0 commit comments