package MyCanvas.GameCanvas;    

import java.util.concurrent.locks.ReentrantLock;

public class FiveRoundData {

	public static int gunBeet;
	public static int changeBeet;
	public static int enemyCount;
	public static int nowRound;
	
	public static int clearTime;
	
	public static int turnNum;
	
	public static ReentrantLock fiveRoundLock = new ReentrantLock();
	
	public static void setRoundOne(){
		fiveRoundLock.lock();
		gunBeet = 10;
		changeBeet = 10;
		enemyCount = 10;
		nowRound = 1;
		turnNum = 500;
		fiveRoundLock.unlock();
	}
	
	public static void setRoundTwo(){
		fiveRoundLock.lock();
		gunBeet = 10;
		changeBeet = 10;
		enemyCount = 10;
		nowRound = 2;
		turnNum = 350;
		fiveRoundLock.unlock();
	}
	
	public static void setRoundThree(){
		fiveRoundLock.lock();
		gunBeet = 10;
		changeBeet = 10;
		enemyCount = 10;
		nowRound = 3;
		turnNum = 200;
		fiveRoundLock.unlock();
	}
	
	public static void setRoundFour(){
		fiveRoundLock.lock();
		gunBeet = 10;
		changeBeet = 10;
		enemyCount = 10;
		nowRound = 4;
		turnNum = 100;
		fiveRoundLock.unlock();
	}
	
	public static void setRoundFive(){
		fiveRoundLock.lock();
		gunBeet = 10;
		changeBeet = 10;
		enemyCount = 10;
		nowRound = 5;
		turnNum = 100;
		fiveRoundLock.unlock();
	}
	public static int getTurnNum(){
		int x = 0;
		fiveRoundLock.lock();
		x = turnNum;
		fiveRoundLock.unlock();
		return x;
	}
	
	public static int upRound(){
		if (nowRound == 1){
			setRoundTwo();
			return 2;
		}
		else if (nowRound == 2){
			setRoundThree();
			return 3;
		}
		else if (nowRound == 3){
			setRoundFour();
			return 4;
		}
		else if (nowRound == 4){
			setRoundFive();
			return 5;
		}
		else if (nowRound == 5){
			return 0;
		}
		return -1;
	}
}
