ShowdownData

io.github.pidoveproject.showdown.ShowdownData
See theShowdownData companion object
case class ShowdownData(userCount: Option[Count], battleCount: Option[Count], challStr: Option[ChallStr], loggedUser: Option[LoggedUser], gameSearch: GameSearch, formatCategories: List[FormatCategory], joinedRooms: Map[RoomId, JoinedRoom], battleRooms: Map[String, BattleRoomInfo], chatRooms: Map[String, ChatRoomInfo], userDetails: Map[String, UserInfo])

The state of the Showdown connection.

Value parameters

battleCount

the number of currently-playing battles

battleRooms

the currently-playing battle rooms

challStr

the challstr of the session

chatRooms

the available chat rooms

formatCategories

the formats and categories available on the connected server

gameSearch

the current state of game matchmaking

joinedRooms

the room the logged user is currently connected to

loggedUser

the currently logged-in user

userCount

the number of online users

userDetails

the details of other users

Attributes

Companion
object
Source
ShowdownData.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Get the room information from an id.

Get the room information from an id.

Value parameters

id

the id of the room to get

Attributes

Returns

the room with the given id or an empty instance if it does not exist

Source
ShowdownData.scala
def getUserDetails(id: String): Option[UserInfo]

Get the details of a user.

Get the details of a user.

Value parameters

id

the id of the user

Attributes

Returns

the details of the user with the given id or None if absent

Source
ShowdownData.scala
def isLoggedAs(name: Username): Boolean

Check if the client is logged with the given name.

Check if the client is logged with the given name.

Value parameters

name

the name to check

Attributes

Returns

whether the current user has the name name or not

Source
ShowdownData.scala

Update this data according to the passed server event/message.

Update this data according to the passed server event/message.

Value parameters

message

the message sent by the server

Attributes

Returns

a new ShowdownData updated according to the given message

Source
ShowdownData.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product