|
1 package org.hedgewars.hedgeroid.Datastructures; |
|
2 |
|
3 import android.content.res.Resources; |
|
4 |
|
5 /** |
|
6 * A room as presented in the roomlist in a server lobby. |
|
7 */ |
|
8 public final class Room { |
|
9 public final String name, map, scheme, weapons, owner; |
|
10 public final int playerCount, teamCount; |
|
11 public final boolean inProgress; |
|
12 |
|
13 public Room(String name, String map, String scheme, String weapons, |
|
14 String owner, int playerCount, int teamCount, boolean inProgress) { |
|
15 this.name = name; |
|
16 this.map = map; |
|
17 this.scheme = scheme; |
|
18 this.weapons = weapons; |
|
19 this.owner = owner; |
|
20 this.playerCount = playerCount; |
|
21 this.teamCount = teamCount; |
|
22 this.inProgress = inProgress; |
|
23 } |
|
24 |
|
25 public String formatMapName(Resources res) { |
|
26 return MapRecipe.formatMapName(res, map); |
|
27 } |
|
28 |
|
29 @Override |
|
30 public String toString() { |
|
31 return "RoomlistRoom [name=" + name + ", map=" + map + ", scheme=" |
|
32 + scheme + ", weapons=" + weapons + ", owner=" + owner |
|
33 + ", playerCount=" + playerCount + ", teamCount=" + teamCount |
|
34 + ", inProgress=" + inProgress + "]"; |
|
35 } |
|
36 } |