#include <iostream>
#include <cstdlib>
#include <ctime>
#include "snaps.h"
#include "mcntl.h"
#include "mfile_open.h"
#include "option.h"

void cntl(int argc , char *argv[])
{

	using namespace std;

	int HIKISU = 13;

	
	if(argc != HIKISU + 1)
	{
		printf("入力された引数が異なります。\n");
		exit(1);
	}


	Kako_Saimu = atoi(argv[7]);  
	if(Kako_Saimu == 0)
	{		
		strcpy( KOKUNEN , argv[3]);
		Jyukyusha_Nomi = 0;
	}
	else if(Kako_Saimu == 1)
	{
		sprintf( KOKUNEN , "%s%s", argv[3] , KAKO );
		Jyukyusha_Nomi = 0;
	}
	else if(Kako_Saimu == 2)
	{
		sprintf( KOKUNEN , "%s%s", argv[3], KAKO_J );
		Kako_Saimu = 1;
		Jyukyusha_Nomi = 1;
	}
	
	strcpy( ECON , argv[4]);
	strcpy(SOTOWAKU , argv[5]);
	Part_S = atoi(argv[6]);
	Option = atoi(argv[8]);
	strcpy(SOTOWAKU_JURAI , argv[9]);
	TINSURA = atoi(argv[10]);
	strcpy( BIRTHFILE, argv[11]);
	strcpy( DEATH, argv[12]);
	OPTION_START = atoi(argv[13]);

	if(Part_S >= 2){
		Part = 1;
	} else {
		Part = 0;
	}

	Saikakudai_Noufu = 0;

	
	sprintf(Version , "%s-%s-%s",KOKUNEN,ECON,SOTOWAKU);	

	Kugiri_Nendo = 2019;
	
	Kokko_Wariai[1] = 1. / 3.;
	Kokko_Wariai[2] = 1. / 2.;
	
	Kisai_Shitasasae = 0.80;
	
	Noufuritu_Zentei = 1;

	Part_Year_1 = 2024;
	Part_Tuki_1 = 4;

}

