我正在尝试建立一个有多种类型的游戏,每种类型都有很多尺寸,每种尺寸都有很多难度级别。但是 RoomConfig Build 指出:
public RoomConfig.Builder setVariant (int variant)
Sets the variant for the room when calling createRoom(RoomConfig). This is an optional, developer-controlled parameter describing the type of game to play, and is used for auto-matching criteria. Must be either a value from 1 to 1023 (inclusive), or ROOM_VARIANT_ANY (the default) if not desired.
我无法将所有这些类型拆分为从 1 到 1023 的整数,即使我将它们拆分为该整数的位。
那么有没有办法向游戏创建发送多个参数?