Skip to content
Browse files

once again passing most tests

  • Loading branch information...
1 parent c2aa4e5 commit 74bb083ecab87539cae6b4d6003cd298a213cc27 @eschulte committed May 26, 2012
Showing with 30 additions and 30 deletions.
  1. +1 −1 go-gtp.el
  2. +2 −2 go-sgf.el
  3. +10 −10 go-tests.el
  4. +16 −16 go-trans.el
  5. +1 −1 sgf2el.el
View
2 go-gtp.el
@@ -54,7 +54,7 @@
(t (+ ?A num)))))
(defun go-pos-to-gtp (pos)
- (format "%c%d" (num-to-char (1+ (car pos))) (1+ (cdr pos))))
+ (format "%c%d" (go-gtp-num-to-char (1+ (car pos))) (1+ (cdr pos))))
(defun go-gtp-to-pos (color gtp)
(cons color (cons :pos (cons (go-gtp-char-to-num (aref gtp 0))
View
4 go-sgf.el
@@ -63,10 +63,10 @@
"Class for the SGF back end.")
(defmethod current ((sgf sgf))
- (sgf-ref (self sgf) (index sgf)))
+ (go-sgf-ref (self sgf) (index sgf)))
(defmethod root ((sgf sgf))
- (sgf-ref (self sgf) '(0)))
+ (go-sgf-ref (self sgf) '(0)))
(defmethod go->move ((sgf sgf) move))
View
20 go-tests.el
@@ -27,11 +27,11 @@
;;; Code:
(require 'go-util)
-(require 'go2el)
+(require 'sgf2el)
(require 'go-board)
(require 'go-gtp)
(require 'go-gnugo)
-(require 'go)
+(require 'go-sgf)
(require 'ert)
@@ -154,14 +154,14 @@
;;; GTP and gnugo tests
(ert-deftest go-test-go-gtp-char-to-gtp ()
- (should (= 1 (go-gtp-char-to-num ?A)))
- (should (= 8 (go-gtp-char-to-num ?H)))
- (should (= 9 (go-gtp-char-to-num ?J)))
- (should (= 19 (go-gtp-char-to-num ?T)))
- (should (= 1 (go-gtp-char-to-num ?a)))
- (should (= 8 (go-gtp-char-to-num ?h)))
- (should (= 9 (go-gtp-char-to-num ?j)))
- (should (= 19 (go-gtp-char-to-num ?t))))
+ (should (= 0 (go-gtp-char-to-num ?A)))
+ (should (= 7 (go-gtp-char-to-num ?H)))
+ (should (= 8 (go-gtp-char-to-num ?J)))
+ (should (= 18 (go-gtp-char-to-num ?T)))
+ (should (= 0 (go-gtp-char-to-num ?a)))
+ (should (= 7 (go-gtp-char-to-num ?h)))
+ (should (= 8 (go-gtp-char-to-num ?j)))
+ (should (= 18 (go-gtp-char-to-num ?t))))
(defmacro with-gnugo (&rest body)
`(let (*gnugo*)
View
32 go-trans.el
@@ -1,4 +1,4 @@
-;;; sgf-trans.el --- Translate and transfer between GO back ends
+;;; go-trans.el --- Translate and transfer between GO back ends
;; Copyright (C) 2012 Eric Schulte <eric.schulte@gmx.com>
@@ -34,20 +34,20 @@
;; - the IGS protocol
;;; Code:
-(require 'sgf-util)
+(require 'go-util)
(require 'eieio)
-(defgeneric sgf->move (back-end move) "Send MOVE to BACK-END.")
-(defgeneric sgf->board (back-end size) "Send SIZE to BACK-END.")
-(defgeneric sgf->resign (back-end resign) "Send RESIGN to BACK-END.")
-(defgeneric sgf->undo (back-end) "Tell BACK-END undo the last move.")
-(defgeneric sgf->comment (back-end comment) "Send COMMENT to BACK-END.")
-(defgeneric sgf->reset (back-end) "Reset the current BACK-END.")
-(defgeneric sgf<-size (back-end) "Get size from BACK-END")
-(defgeneric sgf<-name (back-end) "Get a game name from BACK-END.")
-(defgeneric sgf<-alt (back-end) "Get an alternative from BACK-END.")
-(defgeneric sgf<-move (back-end color) "Get a pos from BACK-END.")
-(defgeneric sgf<-turn (back-end color) "Get a full turn from BACK-END.")
-(defgeneric sgf<-comment (back-end) "Get COMMENT from BACK-END.")
-
-(provide 'sgf-trans)
+(defgeneric go->move (back-end move) "Send MOVE to BACK-END.")
+(defgeneric go->board (back-end size) "Send SIZE to BACK-END.")
+(defgeneric go->resign (back-end resign) "Send RESIGN to BACK-END.")
+(defgeneric go->undo (back-end) "Tell BACK-END undo the last move.")
+(defgeneric go->comment (back-end comment) "Send COMMENT to BACK-END.")
+(defgeneric go->reset (back-end) "Reset the current BACK-END.")
+(defgeneric go<-size (back-end) "Get size from BACK-END")
+(defgeneric go<-name (back-end) "Get a game name from BACK-END.")
+(defgeneric go<-alt (back-end) "Get an alternative from BACK-END.")
+(defgeneric go<-move (back-end color) "Get a pos from BACK-END.")
+(defgeneric go<-turn (back-end color) "Get a full turn from BACK-END.")
+(defgeneric go<-comment (back-end) "Get COMMENT from BACK-END.")
+
+(provide 'go-trans)
View
2 sgf2el.el
@@ -26,7 +26,7 @@
;; Boston, MA 02110-1301, USA.
;;; Code:
-(require 'sgf-util)
+(require 'go-util)
(defvar prop-re
"\\([[:alpha:]]+\\)\\(\\(\\[\\]\\|[[:space:]]*\\[[^\000]*?[^\\]\\]\\)+\\)")

0 comments on commit 74bb083

Please sign in to comment.
Something went wrong with that request. Please try again.