Fix world spawning and radar

Also expand test coverage a little to ensure it's correct
This commit is contained in:
Marc Di Luzio 2020-06-08 23:02:09 +01:00
parent fba75960f8
commit 43588c0e4b
8 changed files with 130 additions and 45 deletions

View file

@ -174,10 +174,10 @@ func InnerMain(command string) error {
return fmt.Errorf("Server returned failure: %s", response.Error)
} else {
// Print the radar
// Print out the radar
num := int(math.Sqrt(float64(len(response.Tiles))))
for i := 0; i < num; i++ {
for j := num - 1; j >= 0; j-- {
for j := num - 1; j >= 0; j-- {
for i := 0; i < num; i++ {
fmt.Printf("%d", response.Tiles[i+num*j])
}
fmt.Print("\n")