summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBennet Gerlach <bennet_gerlach@web.de>2011-05-31 05:04:28 +0200
committerBennet Gerlach <bennet_gerlach@web.de>2011-05-31 05:04:28 +0200
commit4913a5b5fba2631ee215350efb1a41d95c50249a (patch)
treec8b3f083359ccff0cff949e126f9b4b403606789
parent0e9bf5c52d9542208bd8f23e57901b1d3844dd68 (diff)
downloadJRummikub-4913a5b5fba2631ee215350efb1a41d95c50249a.tar
JRummikub-4913a5b5fba2631ee215350efb1a41d95c50249a.zip
Fix AI initially melding in inspect turn
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@348 72836036-5685-4462-b002-a69064685172
-rw-r--r--src/jrummikub/control/turn/BaseAIControl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jrummikub/control/turn/BaseAIControl.java b/src/jrummikub/control/turn/BaseAIControl.java
index fbd9c75..55cece8 100644
--- a/src/jrummikub/control/turn/BaseAIControl.java
+++ b/src/jrummikub/control/turn/BaseAIControl.java
@@ -63,8 +63,12 @@ public class BaseAIControl extends AbstractTurnControl {
}
private void compute() {
- if (mayRedeal) {
- emitRedeal();
+ if (inspectOnly) {
+ if (mayRedeal) {
+ emitRedeal();
+ } else {
+ emitEndOfTurn();
+ }
} else {
turn();
}