Removed offset for player position calculation as server does this for now
authormile4712 <Lehner.Michael43@gmail.com>
Thu, 13 Dec 2018 14:53:10 +0000 (15:53 +0100)
committermile4712 <Lehner.Michael43@gmail.com>
Thu, 13 Dec 2018 14:53:10 +0000 (15:53 +0100)
Exchanged x and y positions as bomberman map X is specified as xamarin Y and vice versa

src/communication/ConnectionTest/ConnectionTest/ConnectionTest.UWP/ConnectionTest.UWP.csproj.user
src/communication/ConnectionTest/ConnectionTest/ConnectionTest/ConnectionTest.csproj
src/communication/ConnectionTest/ConnectionTest/ConnectionTest/MainPage.xaml.cs
src/communication/ConnectionTest/TcpJsonConnectionTest/Program.cs
src/visualization/Playground/HelloMovingImage/HelloMovingImage/Images/BrickWallBreakable.png [new file with mode: 0644]
src/visualization/Playground/HelloMovingImage/HelloMovingImage/Playground.cs

index 54c6423..f92aef0 100644 (file)
@@ -2,7 +2,7 @@
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <CreateCleanLayout>true</CreateCleanLayout>
-    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugEnabled>true</RemoteDebugEnabled>
     <RemoteDebugMachine>localhost</RemoteDebugMachine>
   </PropertyGroup>
   <PropertyGroup>
index 1bcad56..14c4edb 100644 (file)
   </ItemGroup>
 
   <ItemGroup>
+    <EmbeddedResource Include="..\..\..\..\visualization\Playground\HelloMovingImage\HelloMovingImage\Images\BrickWallBreakable.png" Link="Images\BrickWallBreakable.png" />
+  </ItemGroup>
+
+  <ItemGroup>
     <EmbeddedResource Include="..\..\..\..\visualization\Playground\HelloMovingImage\HelloMovingImage\Images\4Players.png" Link="Images\4Players.png" />
     <EmbeddedResource Include="..\..\..\..\visualization\Playground\HelloMovingImage\HelloMovingImage\Images\Bomb.png" Link="Images\Bomb.png" />
     <EmbeddedResource Include="..\..\..\..\visualization\Playground\HelloMovingImage\HelloMovingImage\Images\Flame.png" Link="Images\Flame.png" />
index f763beb..2cdf227 100644 (file)
@@ -31,7 +31,7 @@ namespace Bomberman
 
             con = new TcpJsonConnection(ServerPkgReceived);
 
-            //con.Connect(IPAddress.Parse("192.168.0.5"));
+            //con.Connect(IPAddress.Parse("10.29.17.60"));
             con.Connect(Dns.GetHostEntry(Dns.GetHostName()).AddressList[1]);    //localhost
 
 
index 413f9d5..65dc90d 100644 (file)
@@ -16,7 +16,7 @@ namespace Bomberman
 
             con.Connect(Dns.GetHostEntry(Dns.GetHostName()).AddressList[1]);    //localhost
             // con.Connect(IPAddress.Parse("fe80::c0a:44f1:63e7:bfb8%4"));
-            // con.Connect(IPAddress.Parse("127.0.0.1"));
+             //con.Connect(IPAddress.Parse("10.29.17.60"));
 
             while (true)
             {
diff --git a/src/visualization/Playground/HelloMovingImage/HelloMovingImage/Images/BrickWallBreakable.png b/src/visualization/Playground/HelloMovingImage/HelloMovingImage/Images/BrickWallBreakable.png
new file mode 100644 (file)
index 0000000..0c95e4a
Binary files /dev/null and b/src/visualization/Playground/HelloMovingImage/HelloMovingImage/Images/BrickWallBreakable.png differ
index 2be8bb6..d40ddda 100644 (file)
@@ -239,14 +239,14 @@ namespace BombermanPlayground
             Source = ImageSource.FromResource(Playground.c_ImageNamespace + ".Images.Unknown.png");
 
             WidthRequest = BlockSize + 1;
-            TranslationX = BlockSize * posX + BlockSize / 2;
+            TranslationX = BlockSize * posY + BlockSize / 2;   // Xamarin X is Bomberman Y and vise-versa. 
             HeightRequest = BlockSize + 1;
-            TranslationY = BlockSize * posY + BlockSize / 2;
+            TranslationY = BlockSize * posX + BlockSize / 2;   // Xamarin X is Bomberman Y and vise-versa. 
         }
 
         public void MoveTo(double posX, double posY)
         {
-            this.TranslateTo(BlockSize * posX + BlockSize / 2, BlockSize * posY + BlockSize / 2);
+            this.TranslateTo(BlockSize * posY + BlockSize / 2, BlockSize * posX + BlockSize / 2);      // Xamarin X is Bomberman Y and vise-versa.
         }
 
     }
@@ -277,7 +277,7 @@ namespace BombermanPlayground
 
     class PlayerBlock : BombermanBlock
     {
-        public PlayerBlock(double posX, double posY, int playerId) : base(posX, posY)
+        public PlayerBlock(double posX, double posY, int playerId) : base(posX-0.5, posY-0.5)  // Server sets offset itself for now..
         {
             const int c_NumOfAvailablePictures = 4;
 
@@ -320,6 +320,12 @@ namespace BombermanPlayground
                     break;
             }
         }
+
+
+        public void MoveTo(double posX, double posY)
+        {
+            base.MoveTo(posX - 0.5, posY - 0.5); // Server sets offset itself for now..
+        }
     }
 
     class ItemBlock : BombermanBlock
@@ -334,7 +340,7 @@ namespace BombermanPlayground
     {
         public DestroyableBlock(double posX, double posY) : base(posX, posY)
         {
-            //Source = ImageSource.FromResource(Playground.c_ImageNamespace+".Images.Unknwon.png");
+            Source = ImageSource.FromResource(Playground.c_ImageNamespace+".Images.BrickWallBreakable.png");
         }
     }