rt

Reader's Theatre
Log | Files | Refs | README | LICENSE

acc.java (814B)


      1 package space.nocebo;
      2 
      3 public class acc {
      4 	private String uname;
      5 	private String pass;
      6 	private int score;
      7 	boolean online;
      8 	int gid;
      9 
     10 	public acc(String n, String p) {
     11 		uname = n;
     12 		pass = p;
     13 		score = util.getRandomInt();
     14 		online = false;
     15 		gid = 0;
     16 	}
     17 
     18 	public acc(String n, String p, int s) {
     19 		uname = n;
     20 		pass = p;
     21 		score = s;
     22 		online = false;
     23 		gid = 0;
     24 	}
     25 	
     26 	public synchronized String getUname() {
     27 		return uname;
     28 	}
     29 
     30 	public synchronized String getPass() {
     31 		return pass;
     32 	}
     33 
     34 	public synchronized int getScore() {
     35 		return score;
     36 	}
     37 
     38 	public synchronized void setScore() {
     39 		score = util.getRandomInt();
     40 	}
     41 
     42 	public boolean getOnline() {
     43 		return online;
     44 	}
     45 
     46 	public void setOnline() {
     47 		online = true;
     48 	}
     49 
     50 	public void setOffline() {
     51 		online = false;
     52 	}
     53 
     54 	public int getGid() {
     55 		return gid;
     56 	}
     57 }