2018 Day 20 Complete
This commit is contained in:
parent
47b656d34a
commit
032308f704
@ -7,8 +7,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
CLEAR_SCREEN = "\033[H\033[2J"
|
||||
|
||||
MAX_INT = int(^uint(0) >> 1)
|
||||
MIN_INT = -MAX_INT - 1
|
||||
)
|
||||
@ -110,19 +108,6 @@ func (f *Facility) setRoom(r *Room) {
|
||||
f.rooms[r.key()] = r
|
||||
}
|
||||
|
||||
func (f *Facility) string() string {
|
||||
var ret string
|
||||
for y := f.minY; y < f.maxY; y++ {
|
||||
for x := f.minX; x < f.maxX; x++ {
|
||||
if r, ok := f.rooms[f.key(x, y)]; !ok {
|
||||
ret += " " + r.key() + " "
|
||||
}
|
||||
}
|
||||
ret += "\n"
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
type Room struct {
|
||||
x, y int
|
||||
dist int
|
||||
|
Loading…
Reference in New Issue
Block a user