Ship Placement problem

Ship Placement problem

I went to :

To download :
Game.Engine.-.Version.1.0.1.zip

I extracted and modified RunGame.bat to :
Battleships.exe -b “Z:\0Deleteme\entelectBattleShip\app\VBBattleShip\entelect” “Z:\0Deleteme\entelectBattleShip\app\VBBattleShip\entelect” --clog --pretty --debug

Once excecuted I found that the map said that the game version is 1.0.0 and not 1.0.1 :
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Game Version : 1.0.0
Game Level : 1
Round Number : 0
Map Dimensions : 10 x 10
Phase : 1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

########## Player
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
########## Opponent
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
##########

---------------------------
Player Name: Cobra Ice
Shots: 0
Hit: 0
Points: 0
Arsenal: SingleShot
Ships: [Submarine,Destroyer,Battle Ship,Carrier,Cruiser]
Status: Alive
---------------------------
Opponent: Cobra Ice
Points: 0
Ships: [Submarine,Destroyer,Battle Ship,Carrier,Cruiser]
Status: Alive
---------------------------

Other than the game version it runs, but I found a strange ship placement problem :
place.txt

Battleship 4 6 North
Carrier 1 1 East
Cruiser 0 0 East
Destroyer 5 3 North
Submarine 7 5 East

engine.log

16-05-2017 16:37:04:449 - I: 	Loaded bot Z:\0Deleteme\entelectBattleShip\app\VBBattleShip\entelect
16-05-2017 16:37:04:464 - I: 	Loaded bot Z:\0Deleteme\entelectBattleShip\app\VBBattleShip\entelect
16-05-2017 16:37:04:464 - I: 	Registered player Cobra Ice
16-05-2017 16:37:04:464 - I: 	Registered player Cobra Ice
16-05-2017 16:37:04:480 - I: 		OK!
16-05-2017 16:37:06:235 - I: 	Added Command PlaceShipCommand for Player Cobra Ice
16-05-2017 16:37:06:396 - I: 	Added Command PlaceShipCommand for Player Cobra Ice
16-05-2017 16:37:06:396 - D: 	Beginning round processing
16-05-2017 16:37:06:396 - D: 	Processing Player Commands
16-05-2017 16:37:06:396 - E: 	Failed to process command PlaceShipCommand for player Cobra IceGameEngine.Exceptions.InvalidCommandException: There was a problem during the placement of player's Cobra Ice ships, the round will be played over
   at GameEngine.Commands.PlayerCommands.PlaceShipCommand.PerformCommand(GameMap gameMap, BattleshipPlayer player) in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\GameEngine\Commands\PlayerCommands\PlaceShipCommand.cs:line 53
   at GameEngine.Engine.GameRoundProcessor.ProcessPlayerCommands() in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\GameEngine\Engine\GameRoundProcessor.cs:line 113

But if I move the [Submarine] one spot left then it works fine with the following map :

Map.txt

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Game Version : 1.0.0
Game Level : 1
Round Number : 1
Map Dimensions : 10 x 10
Phase : 2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

########## Player
~~~~B~~~~~
~~~~B~~~~~
~~~~B~~~~~
~~~~B~~~~~
~~~~~~SSS~
~~~~~D~~~~
~~~~~D~~~~
~~~~~~~~~~
~CCCCC~~~~
RRR~~~~~~~
########## Opponent
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
##########

---------------------------
Player Name: Cobra Ice
Shots: 0
Hit: 0
Points: 0
Arsenal: SingleShot
Ships: [Submarine,Destroyer,Battle Ship,Carrier,Cruiser]
Status: Alive
---------------------------
Opponent: Cobra Ice
Points: 0
Ships: [Submarine,Destroyer,Battle Ship,Carrier,Cruiser]
Status: Alive
---------------------------

Reading the version 1.0.1 log I saw that there was a problem with ship placement and this seem to be a problem like that.
Also looking at the map.txt it still looks like the old 1.0.0 game files, but on the web site it is stated as 1.0.1.
I am struggling to compile from source and therefore was hopeful the precompiled version was working.

Can someone please test with latest game version if the map placement as stated in the above place.txt file is possible and if not then why not ?

I did a test with the precompiled version and had the same results. It is probably a bug in the engine incorrectly measuring the sub as length 4 instead of 3 during the placement phase.

Note that in the change log for engine version 1.0.1 it is stated that version 1.0.0 had a bug where if a ship ends in the last spot on the map then the placement can fail.

It was fixed in 1.0.1

So either the problem still exists in version 1.0.1 or the precompiled version 1.0.1 is not actually 1.0.1, but 1.0.0, where the bug still exists.

I would also like to know how to compile from source as the makefile in the source does not seem to work for me, even if I manually load all the dependencies in linux.

Hi Jacques,

We will look at the issue and hopefully have a response for you in the next few days. I’ve created an issue on the Github page and you can track the progress here.

Thanks.
I reversed the direction of the Sub by starting at the end and then going West.
This is working, so it seems that only ships ending at the end fails.
Also it also only seem to be a problem when going east and no other direction.

Hi Jacques,

Thanks you for the additional information. We will try and get this resolved ASAP.

Hi All,

This should be resolved in the latest release.