Skip to content

Commit 1753e01

Browse files
committed
(trip) +StartTrip +Finish
1 parent 8e430a5 commit 1753e01

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ var Config config
2828

2929
func init() {
3030
Config.UI.SquareSize = 1
31-
Config.UI.VehicleSize = 2
31+
Config.UI.VehicleSize = 5
3232
Config.UI.BackgroundColor = colornames.Whitesmoke
33-
Config.UI.TripDefaultColor = colornames.Blue
33+
Config.UI.TripDefaultColor = colornames.Gray
3434
Config.UI.VehicleDefaultColor = colornames.Red
3535
Config.UI.GridColor = colornames.Gray
3636
Config.UI.WindowTitle = "Google Hashcode 2018 - Simulator!"

ghashcode/trip.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ type Trip struct {
2121

2222
Color color.RGBA
2323

24-
Taken bool
24+
Taken bool
25+
InProgress bool
2526
}
2627

2728
func (t *Trip) DrawToWindow(win *pixelgl.Window) {
@@ -72,3 +73,11 @@ func (t *Trip) SomeoneIsOnIt() {
7273
t.Color = colornames.Cyan
7374
t.Taken = true
7475
}
76+
77+
func (t *Trip) StartTrip() {
78+
t.Color = colornames.Olive
79+
}
80+
81+
func (t *Trip) Finish() {
82+
t.Color = colornames.Greenyellow
83+
}

0 commit comments

Comments
 (0)