﻿using Nemesis.Mathematics.Geometry;

namespace NemesisGame.Planet.Factory
{
    public sealed class PalindrolandFactory : PlanetFactory
    {
        public PalindrolandFactory(Sphere shape, GameResources resources)
            : base(shape, resources)
        { }

        protected sealed override IPlanet CreatePlanet()
        {
            return new Palindroland(CreateDescriptor())
            {
                DayDurationInSeconds = 0.0f
            };
        }

        protected sealed override string CreateInitialCode()
        {
            var planetCode =
@"bool IsPalindrome(string s)
{
  return false;
}";

            planetCode = planetCode.Replace("\r", "");

            return planetCode;
        }
    }
}
