[aisleriot] card-monkey: Add a few switches.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] card-monkey: Add a few switches.
- Date: Mon, 6 Aug 2012 19:14:47 +0000 (UTC)
commit 3456677be31faea9094a6db1532a091c6c62924f
Author: Vincent Povirk <madewokherd gmail com>
Date: Mon Aug 6 14:12:13 2012 -0500
card-monkey: Add a few switches.
games/card-monkey.scm | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/games/card-monkey.scm b/games/card-monkey.scm
index 346e2ca..6fae922 100755
--- a/games/card-monkey.scm
+++ b/games/card-monkey.scm
@@ -1,7 +1,9 @@
#! /usr/bin/guile -s
!#
-; Usage: guile -s card-monkey.scm [game.scm] [number of moves] [timeout in seconds]
+; Usage: guile -s card-monkey.scm [game.scm] [number of moves] [timeout in seconds] [-v] [-d]
; example: card-monkey.scm klondike.scm 100 60
+; -v - Display the game state after each move.
+; -d - Deterministic mode - do not seed the PRNG.
(define-module (aisleriot interface))
@@ -410,10 +412,13 @@
(if (string=? (cadr args) "rules/clock.scm")
(set! skip-obscure-drop-check #t))
(log-status (list "testing" args "\n"))
- (let ((time (gettimeofday)))
- (set! *random-state*
- (seed->random-state (+ (car time)
- (cdr time)))))
+ (if (member "-v" args)
+ (set! _verbose #t))
+ (if (not (member "-d" args))
+ (let ((time (gettimeofday)))
+ (set! *random-state*
+ (seed->random-state (+ (car time)
+ (cdr time))))))
(load (cadr args))
(_start-game)
;(set! skip-drop-fail-checks (> SLOTS 40))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]