This commit is contained in:
Simon
2018-11-27 16:02:21 -05:00
parent 54ed05b86c
commit 3776070689
18 changed files with 36 additions and 88 deletions

View File

@@ -21,8 +21,7 @@ import java.util.*;
public class Cubot extends GameObject implements Updatable, ControllableUnit, MessageReceiver,
Attackable, Rechargeable, HardwareHost {
private static final char MAP_INFO = 0x0080;
private static final char MAP_INFO = 0x0200;
/**
* Hit points

View File

@@ -107,8 +107,8 @@ public class CubotLidar extends CubotHardwareModule {
//Write map data to the location specified by register X
int i = getCpu().getRegisterSet().getRegister("X").getValue();
for (int y = 0; y < cubot.getWorld().getWorldSize(); y++) {
for (int x = 0; x < cubot.getWorld().getWorldSize(); x++) {
for (int x = 0; x < cubot.getWorld().getWorldSize(); x++) {
for (int y = 0; y < cubot.getWorld().getWorldSize(); y++) {
getCpu().getMemory().set(i++, mapInfo[x][y]);
}
}