@@ -11,36 +11,47 @@ import (
1111
1212func DrawScore (win * pixelgl.Window , score int ) {
1313 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
14- txt := text .New (pixel .V (920 , 685 ), basicAtlas )
14+ txt := text .New (pixel .V (900 , 685 ), basicAtlas )
1515
16- fmt .Fprintf (txt , "Score : %06d " , score )
16+ fmt .Fprintf (txt , "Score : %09d " , score )
1717
1818 txt .Draw (win , pixel .IM )
1919}
2020
2121func DrawStepNumber (win * pixelgl.Window , step int ) {
2222 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
23- txt := text .New (pixel .V (920 , 700 ), basicAtlas )
23+ txt := text .New (pixel .V (900 , 700 ), basicAtlas )
2424
25- fmt .Fprintf (txt , "Step : %06d" , step )
25+ fmt .Fprintf (txt , "Step : %06d" , step )
2626
2727 txt .Draw (win , pixel .IM )
2828}
2929
3030func DrawNumberOfVehicles (win * pixelgl.Window , numberOfVehicles int ) {
3131 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
32- txt := text .New (pixel .V (850 , 670 ), basicAtlas )
32+ txt := text .New (pixel .V (830 , 670 ), basicAtlas )
3333
34- fmt .Fprintf (txt , "Number of cars : %04d" , numberOfVehicles )
34+ fmt .Fprintf (txt , "Number of cars : %04d" , numberOfVehicles )
3535
3636 txt .Draw (win , pixel .IM )
3737}
3838
3939func DrawNumberOfTrips (win * pixelgl.Window , numberOfTrips int ) {
4040 basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
41- txt := text .New (pixel .V (850 , 655 ), basicAtlas )
41+ txt := text .New (pixel .V (830 , 655 ), basicAtlas )
4242
43- fmt .Fprintf (txt , "Number of trips : %04d" , numberOfTrips )
43+ fmt .Fprintf (txt , "Number of trips : %04d" , numberOfTrips )
44+
45+ txt .Draw (win , pixel .IM )
46+ }
47+
48+ func DrawStartHint (win * pixelgl.Window ) {
49+ basicAtlas := text .NewAtlas (basicfont .Face7x13 , text .ASCII )
50+ txt := text .New (pixel .V (340 , 30 ), basicAtlas )
51+
52+ fmt .Fprintf (txt , " Press [T] to display all the trips (at your own risk)\n " )
53+ fmt .Fprintf (txt , " [Arrow Keys] to move around [Scroll] to Zoom in/out \n " )
54+ fmt .Fprintf (txt , " Press [SPACE] to start/pause simulation" )
4455
4556 txt .Draw (win , pixel .IM )
4657}
0 commit comments