This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
File renamed without changes.
@@ -11,12 +11,12 @@ struct ObservingClient {
public IDisposable unsubscribe;
}
public class SimulationController {
private World w;
private Board w;
private List<ObservingClient> views = new List<ObservingClient>();
private bool running = false;
private int tickTime = 50;

public SimulationController(World w) {
public SimulationController(Board w) {
this.w = w;
}

@@ -4,22 +4,16 @@
using Controllers;

namespace Models {
public class World : IObservable<Command>, IUpdatable
public class Board : IObservable<Command>, IUpdatable
{
private List<Robot> worldObjects = new List<Robot>();
//private List<Robot> worldObjects = new List<Robot>();
private List<IObserver<Command>> observers = new List<IObserver<Command>>();

public World() {
Robot r = CreateRobot(0,0,0);
r.Move(4.6, 0, 13);
}
public Board() {

private Robot CreateRobot(double x, double y, double z) {
Robot r = new Robot(x,y,z,0,0,0);
worldObjects.Add(r);
return r;
}


public IDisposable Subscribe(IObserver<Command> observer)
{
if (!observers.Contains(observer)) {
@@ -37,24 +31,23 @@ public IDisposable Subscribe(IObserver<Command> observer)
}

private void SendCreationCommandsToObserver(IObserver<Command> obs) {
foreach(Robot m3d in worldObjects) {
obs.OnNext(new UpdateModel3DCommand(m3d));
}
//foreach(robot m3d in worldObjects) {
// obs.OnNext(new UpdateModel3DCommand(m3d));
//}
}

public bool Update(int tick)
{
for(int i = 0; i < worldObjects.Count; i++) {
Robot u = worldObjects[i];
//for(int i = 0; i < worldObjects.Count; i++) {

if(u is IUpdatable) {
bool needsCommand = ((IUpdatable)u).Update(tick);
// if(u is IUpdatable) {
// bool needsCommand = ((IUpdatable)u).Update(tick);

if(needsCommand) {
SendCommandToObservers(new UpdateModel3DCommand(u));
}
}
}
// if(needsCommand) {
// SendCommandToObservers(new UpdateModel3DCommand(u));
// }
// }
//}

return true;
}
File renamed without changes.
@@ -12,4 +12,8 @@
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\textures\" />
</ItemGroup>

</Project>
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2041
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monopoly", "Monopoly.csproj", "{5D75E986-210D-4406-BCBB-424809EBE484}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5D75E986-210D-4406-BCBB-424809EBE484}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D75E986-210D-4406-BCBB-424809EBE484}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D75E986-210D-4406-BCBB-424809EBE484}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D75E986-210D-4406-BCBB-424809EBE484}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {71A153B7-E29F-4386-AA10-2328A5D7E8D5}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
@@ -20,7 +20,7 @@ public class Startup

public Startup(IConfiguration configuration)
{
simulationController = new SimulationController(new Models.World());
simulationController = new SimulationController(new Models.Board());

Thread InstanceCaller = new Thread(
new ThreadStart(simulationController.Simulate));
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("Monopoly")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Monopoly")]
[assembly: System.Reflection.AssemblyTitleAttribute("Monopoly")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

@@ -0,0 +1 @@
952f314d3a5812476e5cf2ead44c03c54b969a89
Binary file not shown.
@@ -0,0 +1 @@
389726d975e061008aff34de334701361360f1d4
Binary file not shown.
@@ -0,0 +1,5 @@
{
"version": 1,
"dgSpecHash": "v/DNDiGhHcKm3yAaa+KfWply1iWCuafPGWOui0DDtkVHShisyjuff+5VU/q8lOCPQ1/qMov+FvV3gzNQ9xYvgA==",
"success": true
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\Users\Niels\Source\Repos\niels1921\Monopoly\Monopoly\obj\project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Niels\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.8.1</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.props" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.props')" />
</ImportGroup>
</Project>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\build\netcoreapp2.0\Microsoft.NETCore.App.targets')" />
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.usersecrets\2.0.2\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.usersecrets\2.0.2\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" />
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.4\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.4\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets')" />
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.all\2.0.9\build\netcoreapp2.0\Microsoft.AspNetCore.All.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.all\2.0.9\build\netcoreapp2.0\Microsoft.AspNetCore.All.targets')" />
</ImportGroup>
</Project>
@@ -12669,11 +12669,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\AmazonSimulator VS\\AmazonSimulator VS\\AmazonSimulator VS.csproj",
"projectName": "AmazonSimulator VS",
"projectPath": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\AmazonSimulator VS\\AmazonSimulator VS\\AmazonSimulator VS.csproj",
"projectUniqueName": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\Monopoly\\Monopoly.csproj",
"projectName": "Monopoly",
"projectPath": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\Monopoly\\Monopoly.csproj",
"packagesPath": "C:\\Users\\Niels\\.nuget\\packages\\",
"outputPath": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\AmazonSimulator VS\\AmazonSimulator VS\\obj\\",
"outputPath": "C:\\Users\\Niels\\Source\\Repos\\niels1921\\Monopoly\\Monopoly\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html>

<head>
@@ -69,25 +69,8 @@

if (command.command == "update") {
if (Object.keys(worldObjects).indexOf(command.parameters.guid) < 0) {
if (command.parameters.type == "robot") {
var geometry = new THREE.BoxGeometry(0.9, 0.3, 0.9);
var cubeMaterials = [
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_side.png"), side: THREE.DoubleSide }), //LEFT
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_side.png"), side: THREE.DoubleSide }), //RIGHT
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_top.png"), side: THREE.DoubleSide }), //TOP
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_bottom.png"), side: THREE.DoubleSide }), //BOTTOM
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_front.png"), side: THREE.DoubleSide }), //FRONT
new THREE.MeshBasicMaterial({ map: new THREE.TextureLoader().load("textures/robot_front.png"), side: THREE.DoubleSide }), //BACK
];
var material = new THREE.MeshFaceMaterial(cubeMaterials);
var robot = new THREE.Mesh(geometry, material);
robot.position.y = 0.15;

var group = new THREE.Group();
group.add(robot);

scene.add(group);
worldObjects[command.parameters.guid] = group;
if (command.parameters.type == "Object?") {

}
}

File renamed without changes.
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2047
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmazonSimulator VS", "AmazonSimulator VS\AmazonSimulator VS.csproj", "{057FBBC5-A308-4C83-A878-613EF7231733}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monopoly", "AmazonSimulator VS\Monopoly.csproj", "{057FBBC5-A308-4C83-A878-613EF7231733}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution