project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Room.java
changeset 7342 0e29eec2df5c
parent 7332 3f2e130f9715
child 7352 641f11cdd319
equal deleted inserted replaced
7340:62043f5f7c67 7342:0e29eec2df5c
     1 package org.hedgewars.hedgeroid.netplay;
     1 package org.hedgewars.hedgeroid.netplay;
     2 
     2 
     3 import org.hedgewars.hedgeroid.netplay.JnaFrontlib.RoomPtr;
     3 import org.hedgewars.hedgeroid.R;
     4 /*
     4 
       
     5 import android.content.res.Resources;
       
     6 
     5 public class Room {
     7 public class Room {
       
     8 	public static final String MAP_REGULAR = "+rnd+";
       
     9 	public static final String MAP_MAZE = "+maze+";
       
    10 	public static final String MAP_DRAWN = "+drawn+";
       
    11 	
     6 	public final String name, map, scheme, weapons, owner;
    12 	public final String name, map, scheme, weapons, owner;
     7 	public final int players, clans;
    13 	public final int playerCount, teamCount;
     8 	public final boolean inProgress;
    14 	public final boolean inProgress;
     9 }*/
    15 	public final long id;	// for ListView
       
    16 	
       
    17 	public Room(String name, String map, String scheme, String weapons,
       
    18 			String owner, int playerCount, int teamCount, boolean inProgress, long id) {
       
    19 		this.name = name;
       
    20 		this.map = map;
       
    21 		this.scheme = scheme;
       
    22 		this.weapons = weapons;
       
    23 		this.owner = owner;
       
    24 		this.playerCount = playerCount;
       
    25 		this.teamCount = teamCount;
       
    26 		this.inProgress = inProgress;
       
    27 		this.id = id;
       
    28 	}
       
    29 
       
    30 	public static String formatMapName(Resources res, String map) {
       
    31 		if(map.charAt(0)=='+') {
       
    32 			if(map.equals(MAP_REGULAR)) {
       
    33 				return res.getString(R.string.map_regular);
       
    34 			} else if(map.equals(MAP_MAZE)) {
       
    35 				return res.getString(R.string.map_maze);
       
    36 			} else if(map.equals(MAP_DRAWN)) {
       
    37 				return res.getString(R.string.map_drawn);
       
    38 			}
       
    39 		}
       
    40 		return map;
       
    41 	}
       
    42 }