 !     A ---> D ---------> E ---> F
 !       (2)       (1)       (1)
 
+<<
+
+! In this version, we will use the quotations-aware version through <astar>.
+
 : n ( pos -- neighbours )
     $[ { "ABD" "BC" "C" "DCE" "ECF" } [ unclip swap 2array ] map >hashtable ] at ;
 

!   - going up costs 5 points
!   - going down costs 1 point
!   - going left or right costs 2 points

: reachable? ( pos -- ? )
    first2 [ 2 * 5 + ] [ 2 + ] bi* $[

USING: arrays assocs astar combinators hashtables kernel literals math math.functions
math.vectors sequences sorting splitting strings tools.test ;
IN: astar.tests

! Use a 10x9 maze (see below) to try to go from s to e, f or g.
! X means that a position is unreachable.
