using System;
using VRepProxy.Objects;

namespace VRepProxy
{
	public class Scene
	{
		private Robot robot;

		public Scene(){
			new VRepProxy.Proxy.VRepProxy ("127.0.0.1", 5555);
		}

		public Robot GetRobot(){
			if (robot == null) {
				robot = new Robot ();
			}
			return robot;
		}

		public static void Main (string[] args)
		{
			Scene s = new Scene ();
			Robot robot = s.GetRobot ();
			Wheels wheels = robot.GetWheels ();
			wheels.Move (0.0);
			Perceptions p = robot.GetPerceptions ();
			Console.WriteLine (p.getPerceivedColor());
			foreach(double d in p.getPerceivedDistance ()){
				Console.Write (d + ",");
			}
		}
	}
}

