using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WorldOfPeacecraft
{
    class GameStrategy : IGame
    {

        Decision cooperate;
        Decision defect;
        int counter = 0;

        public GameStrategy(Decision cooperate, Decision defect)
        {
            this.cooperate = cooperate;
            this.defect = defect;

        }

        public Decision getFirstMove()
        {
            return cooperate;
        }

        public Decision getNextMove(Decision opLM)
        {
            if (opLM == cooperate && counter == 0)
            {
                return cooperate;
            }
            else
            {
                counter++;
                if (counter < 10)
                {
                    return defect;
                }
                else
                {
                    counter = 0;
                    return defect;

                }
            }
        }

    }

}
