Copyright (c) 2011-2014, Intel Corporation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redist...
If you think the Android project pokerCCF listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
// This file is part of the 'texasholdem' project, an open source
// Texas Hold'em poker application written in Java.
///*www.java2s.com*/// Copyright 2009 Oscar Stigter
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package lo.wolo.pokerengine.bots;
import java.util.List;
import java.util.Set;
import lo.wolo.pokerengine.Card;
import lo.wolo.pokerengine.Player;
import lo.wolo.pokerengine.TableType;
import lo.wolo.pokerengine.actions.Action;
/**
* Dummy Texas Hold'em poker bot that always just checks or calls. <br />
* <br />
*
* This bot allowed for perfectly predictable behavior.
*
* @author Oscar Stigter
*/publicclass DummyBot extends Bot {
/** {@inheritDoc} */
@Override
publicvoid messageReceived(String message) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid joinedTable(TableType type, int bigBlind, List<Player> players) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid handStarted(Player dealer) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid actorRotated(Player actor) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid playerUpdated(Player player) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid boardUpdated(List<Card> cards, int bet, int pot) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
publicvoid playerActed(Player player) {
// Not implemented.
}
/** {@inheritDoc} */
@Override
public Action act(int minBet, int currentBet, Set<Action> allowedActions) {
if (allowedActions.contains(Action.CHECK)) {
return Action.CHECK;
} else {
return Action.CALL;
}
}
}