Advertisement
Luciano_fuentes

AOJ

Feb 5th, 2017
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.84 KB | None | 0 0
  1. package data;
  2. //Autor: Luciano (G Toyz).
  3. public class DataGame {
  4.     private static final int MAX_USERS = 1;
  5.     Users [] User = new Users [MAX_USERS];
  6.     //Map<int,Usuario>;
  7. }
  8.  
  9. enum Privilege{User,GameMaster,Admin}
  10.  
  11. class Pos{
  12.     int mapa;
  13.     byte x;
  14.     byte y;
  15. }
  16. class Users{
  17.     private String nick;
  18.     private Pos position;
  19.     private Privilege privilege;
  20.    
  21.     public void setPosition(Pos position){
  22.         this.position = position;
  23.     }
  24.     public Pos getPosition(){
  25.         return position;
  26.     }
  27.     public void setNick(String nick){
  28.         this.nick = nick;
  29.     }
  30.     public String getNick(){
  31.         return nick;
  32.     }
  33.     public void setGM(Privilege privilege){
  34.       this.privilege = privilege;
  35.     }
  36.     public boolean isGM(){
  37.         return (privilege == Privilege.User);
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement