namespace TrafficLightsSignalR
{
    public class TrafficLightStateService : ITrafficLightStateService
    {
        // string objects are immutable
        protected TrafficLightState _state;

        public TrafficLightStateService()
        {
            _state = new TrafficLightState(
                new Schema.Period(),
                new Schema.State(),
                -1,
                0.0,
                -1,
                "",
                0.0,
                -1,
                -1);
        }

        public void SetCurrentTrafficLightState(TrafficLightState currentTrafficLightState)
        {
            _state = currentTrafficLightState;
        }

        public TrafficLightState GetCurrentTrafficLightState()
        {
            return _state;
        }
    }
}
