Newer
Older
SproutServerMicro / src / main / java / org / ntlab / SproutServer / rooms / Member.java
s-bekki on 30 Nov 2017 1 KB initial commit
package org.ntlab.SproutServer.rooms;
import java.util.ArrayList;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.ntlab.SproutServer.accounts.Account;
import org.ntlab.SproutServer.accounts.Accounts;

import net.arnx.jsonic.JSONHint;

/**
 * Root resource (exposed at "Rooms" path)
 */

public class Member {

	/**
	 * アカウントリストからユーザ情報の検索
	 */
	public Member(int userId) {
		Accounts ac = Accounts.getInstance();
		for(int i=0; i<ac.getAccounts().size(); i++){
			if(userId == ac.getAccounts().get(i).getUserID()){
				this.userId = userId;
				this.userName = ac.getAccounts().get(i).getUserName();
			}
		}
		
	}

	public int memberId;
	public boolean ready = false;
	public int userId;
	public String userName;
	public boolean hostState;
	public int role;  //役職・・・0が銃、1が魔法
	

	
	//ユーザーネーム
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public boolean isReady() {
		return ready;
	}
	
	public void setReady(boolean ready) {
		this.ready = ready;
	}
	
	public int getUserId() {
		return this.userId;
	}

	public int getMemberId() {
		return memberId;
	}
	
	public void setMemberId(int memberId) {
		this.memberId = memberId;
	}

	//ホストであるか否か
	public boolean isHostState() {
		return hostState;
	}

	public void setHostState(boolean hostState) {
		this.hostState = hostState;
	}

	//役職
	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}
	
	
	
	


	
	
	
	
}