mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-05-31 11:41:29 +00:00
got rid of extraneous digit? function
This commit is contained in:
parent
907d4d36d4
commit
b0fe08bd80
|
@ -8,9 +8,6 @@
|
|||
|
||||
(def operators #{\= \< \> \# \+ \- \* \/})
|
||||
|
||||
(defn digit?
|
||||
[ch]
|
||||
(re-find #"\d" (str ch)))
|
||||
|
||||
(defn conj-with-metadata
|
||||
[coll s n]
|
||||
|
|
|
@ -2,18 +2,6 @@
|
|||
(:require [clojure.test :refer :all]
|
||||
[hs-robotwar.core :refer :all]))
|
||||
|
||||
(deftest digit?-negative
|
||||
(testing "not a digit"
|
||||
(is (not (digit? \f)))))
|
||||
|
||||
(deftest digit?-char-positive
|
||||
(testing "digit char"
|
||||
(is (digit? "6"))))
|
||||
|
||||
(deftest digit?-str-positive
|
||||
(testing "digit str"
|
||||
(is (digit? \6))))
|
||||
|
||||
(def line1 "IF DAMAGE # D GOTO MOVE")
|
||||
(def line2 "AIM-17 TO AIM")
|
||||
(def line3 "IF X<-5 GOTO SCAN")
|
||||
|
|
Loading…
Reference in New Issue
Block a user