Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/blovemaple/mahjong
/ functions
Functions
695 in github.com/blovemaple/mahjong
⨍
Functions
695
◇
Types & classes
114
↓ 3 callers
Method
getPlayerInfo
()
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotCpgdChoice.java:271
↓ 3 callers
Method
getTileWallSize
返回牌墙中的剩余牌数。
src/main/java/com/github/blovemaple/mj/object/MahjongTablePlayerView.java:25
↓ 3 callers
Method
getTimeLimitStrategy
()
src/main/java/com/github/blovemaple/mj/game/GameContext.java:24
↓ 3 callers
Method
getWinTile
()
src/main/java/com/github/blovemaple/mj/game/GameResult.java:41
↓ 3 callers
Method
id
返回ID,同一牌型从0开始,通常是[0,3]。
src/main/java/com/github/blovemaple/mj/object/Tile.java:71
↓ 3 callers
Method
isJiang
()
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileUnit.java:53
↓ 3 callers
Method
meetPrecondition
判断当前状态下指定玩家是否符合做出此类型动作的前提条件(比如“碰”的前提条件是别人刚出牌)。<br> 默认实现调用相应方法对上一个动作和活牌数量进行限制,进行判断。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:49
↓ 3 callers
Method
newBranchOrResult
(ParseBranch baseBranch, List<Tile> selectedTiles, TileUnitType newUnitType, Queue<ParseBranch> branchQueu
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:191
↓ 3 callers
Method
of
(boolean completed, StandardTileUnitType unitType, Set<Tile> tiles)
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileUnit.java:57
↓ 3 callers
Method
rethrowFunction
( Function_WithExceptions<T, R, E> function)
src/main/java/com/github/blovemaple/mj/utils/LambdaUtils.java:64
↓ 3 callers
Method
setContextView
(GameContextPlayerView contextView)
src/main/java/com/github/blovemaple/mj/rule/win/WinInfo.java:82
↓ 3 callers
Method
showActionDefault
(Action action)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:406
↓ 3 callers
Method
viewFocusAndOptions
()
src/main/java/com/github/blovemaple/mj/cli/CliPlayer.java:285
↓ 2 callers
Method
actionDone
(Action action)
src/main/java/com/github/blovemaple/mj/game/GameContext.java:36
↓ 2 callers
Method
addCharHandler
添加一个字符处理器。添加后,读取的所有字符都将交给此字符处理器处理。 @param handler 字符处理器 @param wait 是否等待,直到此监听器停止监听(被移除),此方法才返回 @throws InterruptedException
src/main/java/com/github/blovemaple/mj/cli/CliView.java:153
↓ 2 callers
Method
aliveTilesStr
()
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotCpgdSelectTask.java:65
↓ 2 callers
Method
all
返回所有144张牌的列表。
src/main/java/com/github/blovemaple/mj/object/Tile.java:32
↓ 2 callers
Method
appendGroups
(StringBuilder str)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:143
↓ 2 callers
Method
canDo
判断指定状态下指定位置的玩家可否做此种类型的动作。 @return 能做返回true;否则返回false。
src/main/java/com/github/blovemaple/mj/action/PlayerActionType.java:23
↓ 2 callers
Method
canPass
返回此动作是否可以放弃。 @return 可以放弃返回true;否则返回false。
src/main/java/com/github/blovemaple/mj/action/PlayerActionType.java:30
↓ 2 callers
Method
canWin
判断指定条件下是否可和牌。<br> 默认实现为使用此策略支持的所有和牌类型进行判断,至少有一种和牌类型判断可以和牌则可以和牌。
src/main/java/com/github/blovemaple/mj/rule/GameStrategy.java:85
↓ 2 callers
Method
changingsForWin
用于机器人,获取ChangingForWin的流,移除changeCount个牌,增加(changeCount+1)个牌。
src/main/java/com/github/blovemaple/mj/rule/win/WinType.java:49
↓ 2 callers
Method
combCount
(long total, int select)
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:418
↓ 2 callers
Method
combStreamGreedy
返回指定集合中符合条件的尽量多的元素组合组成的流。 @param coll 指定集合 @param combCollFactory 新建集合对象的函数,用于新建元素组合使用的集合 @param condition 一个组合中的任意两
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:134
↓ 2 callers
Method
distinctCollBy
将指定的集合流按照标识符去重。标识符用指定的函数获取。 @param stream 集合流 @param identifierFunction 获取标识符的函数 @return 去重后的集合流
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:366
↓ 2 callers
Method
findLegalPengGroup
返回在玩家的牌中能与动作牌组成补杠的碰组(Optional)。
src/main/java/com/github/blovemaple/mj/action/standard/BugangActionType.java:76
↓ 2 callers
Method
fireEvent
(GameContext context, BiConsumer<Player, GameContextPlayerView> consumer)
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:353
↓ 2 callers
Method
fixedWidth
如果str不够指定长度,则在后面补空格。
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:409
↓ 2 callers
Method
genChangingsBySelectedUnits
(List<PreUnit> preUnits, List<Tile> aliveTiles, Map<TileType, List<Tile>> candidatesByType)
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:461
↓ 2 callers
Method
get
()
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:49
↓ 2 callers
Method
getActionTilesRange
返回合法动作中相关牌的可选范围。<br> 默认实现为指定玩家的aliveTiles。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:172
↓ 2 callers
Method
getActionTilesSize
返回合法动作中相关牌的数量。可以为0。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:179
↓ 2 callers
Method
getDiscardCandidates
用于机器人,返回建议打出的牌,即从手牌中排除掉明显不应该打出的牌并返回。返回的列表按建议的优先级从高到低排列。
src/main/java/com/github/blovemaple/mj/rule/win/WinType.java:44
↓ 2 callers
Method
getFans
()
src/main/java/com/github/blovemaple/mj/game/GameResult.java:57
↓ 2 callers
Method
getFans
算番。 @param winInfo 被检查的牌 @param fanTypes 使用的番种 @param winTypes 使用的和牌类型 @return 符合的番种和番数
src/main/java/com/github/blovemaple/mj/rule/win/FanType.java:42
↓ 2 callers
Method
getGotTile
返回得牌。类型为暗杠时返回null。 @return 得牌
src/main/java/com/github/blovemaple/mj/object/TileGroupPlayerView.java:40
↓ 2 callers
Method
getNextStageName
()
src/main/java/com/github/blovemaple/mj/action/StageSwitchAction.java:19
↓ 2 callers
Method
getPlayerByLocation
(PlayerLocation location)
src/main/java/com/github/blovemaple/mj/object/MahjongTable.java:112
↓ 2 callers
Method
getPlayerInfoView
返回PlayerInfo视图。
src/main/java/com/github/blovemaple/mj/object/MahjongTablePlayerView.java:40
↓ 2 callers
Method
getStageByName
根据阶段名称返回阶段。
src/main/java/com/github/blovemaple/mj/rule/GameStrategy.java:44
↓ 2 callers
Method
getType
()
src/main/java/com/github/blovemaple/mj/object/TileGroup.java:114
↓ 2 callers
Method
getWinInfo
()
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotSimChanging.java:45
↓ 2 callers
Method
getWinPoint
()
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotSimChanging.java:58
↓ 2 callers
Method
getWinnerLocation
()
src/main/java/com/github/blovemaple/mj/game/GameResult.java:33
↓ 2 callers
Method
got
(TileUnitType type, Collection<Tile> tiles, Tile gotTile)
src/main/java/com/github/blovemaple/mj/object/TileUnit.java:30
↓ 2 callers
Method
handle
(CharHandler handler, char c)
src/main/java/com/github/blovemaple/mj/cli/CliView.java:259
↓ 2 callers
Method
init
初始化显示。 @throws IOException
src/main/java/com/github/blovemaple/mj/cli/CliView.java:65
↓ 2 callers
Method
init
()
src/main/java/com/github/blovemaple/mj/object/MahjongTable.java:35
↓ 2 callers
Method
initParseUnits
()
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileNeighborhood.java:104
↓ 2 callers
Method
isLegalActionTiles
判断动作是否合法。<br> 默认实现为:先检查前提条件、相关牌数量、相关牌范围,如果满足再调用{@link #isLegalActionWithPreconition}。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:185
↓ 2 callers
Method
isLegalTilesWithCorrectSize
(Collection<Tile> tiles)
src/main/java/com/github/blovemaple/mj/object/StandardTileUnitType.java:27
↓ 2 callers
Method
isNeighbors
(Tile tile1, Tile tile2)
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileNeighborhood.java:70
↓ 2 callers
Method
legalActionTilesStream
返回一个流,流中包含指定状态下指定玩家可作出的此类型的所有合法动作的相关牌集合。<br> 默认实现为:在玩家手中的牌中选取所有合法数量个牌的组合,并使用{@link #isLegalActionTiles}过滤出合法的组合。<br> 如果合法的相关牌不限于手中的牌,则需要子类重写此方法。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:158
↓ 2 callers
Method
moveFocusChoice
(boolean forward)
src/main/java/com/github/blovemaple/mj/cli/CliPlayer.java:251
↓ 2 callers
Method
ofName
(String name)
src/main/java/com/github/blovemaple/mj/utils/LanguageManager.java:100
↓ 2 callers
Method
parsePreShunkes
(List<Tile> aliveTiles, Map<TileSuit, List<Tile>> candidatesBySuit)
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:314
↓ 2 callers
Method
parseWinTileUnits
全部解析成可以和牌的完整的TileUnit集合的列表并填入和牌信息并返回,失败填入并返回空列表。 @param winInfo 和牌信息
src/main/java/com/github/blovemaple/mj/rule/win/WinType.java:26
↓ 2 callers
Method
play
进行一局麻将游戏,结束后返回结果。 @return 结果 @throws InterruptedException 等待玩家做出选择的时候当前线程被中断
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:62
↓ 2 callers
Method
preShunkesStreamGreedy
(List<PreUnit> preShunkes, int forCount)
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:417
↓ 2 callers
Method
remainColl
将指定的一个集合中的元素减去指定元素产生一个新的集合并返回。
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:314
↓ 2 callers
Method
run
()
src/main/java/com/github/blovemaple/mj/cli/CliRunner.java:51
↓ 2 callers
Method
setGameResult
(GameResult gameResult)
src/main/java/com/github/blovemaple/mj/game/GameContext.java:46
↓ 2 callers
Method
setLastDrawedTile
(Tile lastDrawedTile)
src/main/java/com/github/blovemaple/mj/object/PlayerInfo.java:44
↓ 2 callers
Method
setUnits
(WinType winType, List<List<TileUnit>> units)
src/main/java/com/github/blovemaple/mj/rule/win/WinInfo.java:108
↓ 2 callers
Method
setWinTile
(Tile winTile)
src/main/java/com/github/blovemaple/mj/game/GameResult.java:45
↓ 2 callers
Method
showAction
(Action action)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:273
↓ 2 callers
Method
typeDistinctStream
(Collection<Tile> tiles, int size)
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotCpgdChoice.java:251
↓ 2 callers
Method
units
()
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileUnits.java:58
↓ 1 callers
Method
afterSimAction
模拟执行指定动作,并返回新的实例。模拟动作在新实例上执行,不改变本实例的状态。 @param action 模拟执行的动作 @return 执行完动作的新实例。如果模拟动作为放弃(null),则直接返回当前实例。
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotSimContext.java:74
↓ 1 callers
Method
aliveTilesStr
(GameContextPlayerView contextView)
src/main/java/com/github/blovemaple/mj/local/AbstractBot.java:118
↓ 1 callers
Method
all
返回所有牌型的列表。
src/main/java/com/github/blovemaple/mj/object/TileType.java:42
↓ 1 callers
Method
allChoices
()
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotCpgdSelectTask.java:135
↓ 1 callers
Method
allCombs
挑选符合数量要求的unit组合,返回所有的可能。<br> 先找到第一个unit,然后返回以下结果: <li>把数量要求减1、去除与第一个unit冲突者,并递归调用,最后把第一个unit和递归调用的结果分别拼接; <li>按照原数量要求,从所有剩余unit中递归获取结果。 @param maxUni
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileUnits.java:89
↓ 1 callers
Method
allOfType
返回指定牌型的所有牌的集合。
src/main/java/com/github/blovemaple/mj/object/Tile.java:39
↓ 1 callers
Method
appendOptions
(StringBuilder str)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:250
↓ 1 callers
Method
appendTimeLimit
(StringBuilder str)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:265
↓ 1 callers
Method
appendTingStatus
(StringBuilder str)
src/main/java/com/github/blovemaple/mj/cli/CliGameView.java:242
↓ 1 callers
Method
bazBotAliveTilesTest
()
src/test/java/com/github/blovemaple/mj/local/bazbot/BazBotTest.java:17
↓ 1 callers
Method
calcProb
(Collection<TileType> tileTypes)
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotSimContext.java:159
↓ 1 callers
Method
canDoWithPrecondition
判断指定状态下指定位置的玩家可否做此种类型的动作。调用此方法之前已经使用{@link #meetPrecondition}判断过符合前提条件。 <br> 默认实现为:判断{@link #legalActionTilesStream}返回的流不为空。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:104
↓ 1 callers
Method
checkReady
检查一个麻将桌是否符合条件开始进行一局。 @param table 麻将桌 @return 如果可以开始,返回true,否则返回false。
src/main/java/com/github/blovemaple/mj/rule/GameStrategy.java:34
↓ 1 callers
Method
chooseAction
决定要执行的动作。先让stage和玩家选择,如果无可选动作或者都选择不做动作,则从stage获取默认动作。
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:135
↓ 1 callers
Method
chooseAction0
(GameContextPlayerView contextView, Set<PlayerActionType> actionTypes)
src/main/java/com/github/blovemaple/mj/local/AbstractBot.java:83
↓ 1 callers
Method
chooseAndDoAction
在指定的状态下执行一步动作。 @return 有没有执行动作 @throws InterruptedException
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:114
↓ 1 callers
Method
chooseCpgdAction
(GameContextPlayerView contextView, Set<PlayerActionType> actionTypes, List<PlayerAction> actions)
src/main/java/com/github/blovemaple/mj/local/AbstractBot.java:164
↓ 1 callers
Method
chooseCpgdActionWithTimer
(GameContextPlayerView contextView, Set<PlayerActionType> actionTypes, List<PlayerAction> actions)
src/main/java/com/github/blovemaple/mj/local/AbstractBot.java:150
↓ 1 callers
Method
classes
从包package中获取所有的Class。<br> 来源:http://lushuifa.iteye.com/blog/1972847
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:439
↓ 1 callers
Method
cleanPreUnits
(List<PreUnit> preJiangs, List<PreUnit> preShunkes)
src/main/java/com/github/blovemaple/mj/rule/simple/NormalWinType.java:346
↓ 1 callers
Method
combSetStream
返回指定集合中指定个数的元素组合(HashSet)组成的流。 @param coll 指定集合 @param size 组合中的元素个数 @return 组合Set的流
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:47
↓ 1 callers
Method
combStreamGreedy0
@param coll @param limit @param combCollFactory @param selected 当前递归分支的已选元素 @param conflictsMap 所有元素 - 与之冲突的元素集合 @param checkPoi
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:202
↓ 1 callers
Method
compete
(int gameCount)
src/main/java/com/github/blovemaple/mj/botcompetition/BotCompetition.java:39
↓ 1 callers
Method
cpgdActions
(GameContextPlayerView contextView, Set<PlayerActionType> actionTypes)
src/main/java/com/github/blovemaple/mj/local/AbstractBot.java:126
↓ 1 callers
Method
determineAction
(Map<PlayerLocation, Set<PlayerActionType>> choicesByLocation, Map<PlayerLocation, PlayerAction> choseActi
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:292
↓ 1 callers
Method
disjointBy
判断指定两个集合中的元素是否没有任何标识符重复。标识符用指定的函数获取。 @param c1 集合1 @param c2 集合2 @param identifierFunction 获取标识符的函数 @return 没有重复返回tr
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:386
↓ 1 callers
Method
doAction
(GameContext context, Action action)
src/main/java/com/github/blovemaple/mj/game/MahjongGame.java:347
↓ 1 callers
Method
doAction
(GameContextPlayerView baseContextView, PlayerInfo baseInfo, PlayerAction action)
src/main/java/com/github/blovemaple/mj/local/barbot/BarBotCpgdChoice.java:74
↓ 1 callers
Method
doLegalAction
执行动作。调用此方法之前已经确保符合动作类型,并使用{@link #isLegalActionTiles}判断过动作的合法性。
src/main/java/com/github/blovemaple/mj/action/AbstractPlayerActionType.java:216
↓ 1 callers
Method
drawBottom
从牌墙的底部摸指定数量的牌并返回。
src/main/java/com/github/blovemaple/mj/object/MahjongTable.java:93
↓ 1 callers
Method
findAndAddClassesInPackageByFile
以文件的形式来获取包下的所有Class。<br> 来源:http://lushuifa.iteye.com/blog/1972847 @param packageName @param packagePath @param recursive @param classes
src/main/java/com/github/blovemaple/mj/utils/MyUtils.java:529
↓ 1 callers
Method
forEachHoodAndUnits
(BiConsumer<BazBotTileNeighborhood, List<BazBotTileUnit>> action)
src/main/java/com/github/blovemaple/mj/local/bazbot/BazBotTileUnits.java:62
← previous
next →
101–200 of 695, ranked by callers