package account;

import java.util.ArrayList;
import java.util.Date;

import game.IGameElement;
import game.IGameElementVisitor;
import game.Player;
import room.Room;

public class Account implements IGameElement {
	private String name;
	private String pass;
	private String sId;
	private Room room; 
	private String wait = "no";
	private int team;
	
	private Date finalConnectTime;

	private Player player;
	
	//player
	public Player getPlayer() {
		return player;
	}
	public void setPlayer(Player player) {
		this.player = player;
	}
	
	public void newPlayer() {
System.out.println("Account newPlayer in");
		this.player = new Player();
System.out.println("Account newPlayer out");
	}
	
	
	//name
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	//pass
	public String getPass() {
		return pass;
	}
	public void setPass(String pass) {
		this.pass = pass;
	}
	
	//sId
	public String getsId() {
		return sId;
	}
	public void setsId(String sId) {
		this.sId = sId;
	}
	
	//room
	public Room getRoom() {
		return room;
	}
	public void setRoom(Room room) {
		this.room = room;
	}
	
	//Wait
	public String getWait() {
		return wait;
	}
	public void setWait(String wait) {
		this.wait = wait;
	}
	
	//team
	public int getTeam() {
		return team;
	}
	public void setTeam(int team) {
		this.team = team;
	}
	
	//finalConnectTime
	public Date getFinalConnectTime() {
		return finalConnectTime;
	}
	public void setFinalConnectTime() {
		finalConnectTime = new Date();
	}
	
	//visitorによる処理を受け入れる
	public boolean accept(IGameElementVisitor v) {
		if(!v.visit(this)) return false;
		return true;
	}
}

