cleanup
This commit is contained in:
parent
af9d9436f5
commit
914d2592a3
8
main.rkt
8
main.rkt
|
@ -2,7 +2,6 @@
|
|||
|
||||
(provide (all-defined-out)) ; for testing module
|
||||
|
||||
|
||||
; a Board is a list of lines.
|
||||
|
||||
; represents a point in 2d space.
|
||||
|
@ -30,9 +29,6 @@
|
|||
(equal? (line-to l1) (line-from l2))
|
||||
(equal? (line-from l1) (line-to l2)))))
|
||||
|
||||
|
||||
|
||||
|
||||
; Line -> Bool
|
||||
; returns #t if a line is valid in terms of length (only moving one point in one direction)
|
||||
(define (valid-length? line)
|
||||
|
@ -49,8 +45,6 @@
|
|||
(< (- GRID-WIDTH 1) (point-x p))
|
||||
(< (- GRID-WIDTH 1) (point-y p))))
|
||||
|
||||
|
||||
|
||||
; Line Board -> Bool
|
||||
; returns #t if adding the given move to the board is valid.
|
||||
(define (valid-move? line board)
|
||||
|
@ -59,4 +53,4 @@
|
|||
(valid-length? line)
|
||||
(and
|
||||
(not (out-of-bounds? (line-from line)))
|
||||
(not (out-of-bounds? (line-to line))))))
|
||||
(not (out-of-bounds? (line-to line))))))
|
Loading…
Reference in New Issue