[iagno] Computer: move quickly if only one spot remains
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Computer: move quickly if only one spot remains
- Date: Thu, 23 Jan 2014 03:07:05 +0000 (UTC)
commit 57a072c69149e18f9c5e709f4bf76d7fdb1531fc
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Nov 4 21:53:44 2013 -0600
Computer: move quickly if only one spot remains
When there's only one spot remaining on the board, it looks silly for
the computer to sit and wait to "think" about it.
src/iagno.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/iagno.vala b/src/iagno.vala
index 39f0433..75cd76a 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -346,7 +346,9 @@ public class Iagno : Gtk.Application
* higher difficulties. (In actuality, Hard will take longer anyway
* since it must search deeper, but this compensates somewhat.)
*/
- if (game.current_color == Player.LIGHT && light_computer != null)
+ if (game.n_tiles == 63)
+ computer_timer = Timeout.add_seconds (1, computer_move_cb);
+ else if (game.current_color == Player.LIGHT && light_computer != null)
computer_timer = Timeout.add_seconds (5 - light_computer.level, computer_move_cb);
else if (game.current_color == Player.DARK && dark_computer != null)
computer_timer = Timeout.add_seconds (5 - dark_computer.level, computer_move_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]