Test Harnass bug - Player A and B

Hey guys, Just stumbled upon a slight bug, not sure if anyone has reported it yet.

When having my bots face each other (2 java bots with the same bot.json file). I noticed that the log printed out for both player 1 and player 2 were exactly the same. I would hit a ship and my board state will not even see it. My bot behaves in a certain way once it hits a target. What I noticed was. My bot randomly broke when I copied my bot into a secondary directory to have it face itself. My launch command is as follows:

Battleships.exe -b “…\Reference Bots\C#” “…\Reference Bots\bot1” --clog --pretty --debug --size 3

So in both those folders the same bot exists. What happened was. My bot1 analyzed the board as if it had bot C#'s board state.

The moment I change one bot’s bot.json files so that they arent the same everything works normally again. So there seems to be some kind of issue. I can reproduce this if more information is needed.

Oddly enough. My map files differ for player A and B. Its just the content I print out into my log.txt files thats the same.

I am getting my map info from a simple call:
OpponentMap P2 = state.OpponentMap;
ArrayList P2M = P2.Cells;

As player B this call returns my own board state instead of the opponents which should be the case. I cannot say if this bug is in the game harness or the reference bot itself. Unfortunately I working with unfamiliar languages so I could not identify the source of the bug. I just believe it could be a problem if two people (Against all odds) choose the same names and one bot is broken because of it.

Hi WillieTheron,

Thanks for reporting this.

We will have a look at the issue once we have some spare time available. You can track the progress of the issue here.