                     newPositions.push(potentialPosition)
                     recursiveSolve(word, newPositions)
 
-        console.log "Solving..."
-        for pos in startingPositions
-            console.log "Checking out this ",pos," where", @get(pos)
+        for pos in @getPlayerPositions(@player)
+            #console.log "Checking out this ",pos," where", @get(pos)
             recursiveSolve('', [pos])
 
-
-
-
+        foundWords.sort (a, b) => b[2] - a[2]
+        foundWords.filter (row) =>
+            for row2 in foundWords
+                if row != row2 and row[0] == row2[0]
+                    return false
+            return true
+
+        foundWords
+
+board = boardStringToArray(boardString)
+positionBoard = boardStringToArray(positionString)
 
 console.log "Game Board:"
 console.log board
-console.log board.length
-console.log board[12]
-
-
-solver = new BoardSolver(board)
-console.log "Words", words.length
-words = filterWordsByBoard(words, solver)
-console.log "Words (after)", words.length
+console.log "Position Board:"
+console.log positionBoard
+
+solver = new BoardSolver(board, positionBoard, 0)
+
+console.log "Dictionary", words.length
+#words = filterWordsByBoard(words, solver)
+console.log "Dictionary (after filtering)", words.length
+
+time_start = Date.now()
 tri = new Tri(words)
-
-
-
-solver.solve(tri)+console.log "Building tri-tree took ",(Date.now() - time_start)/1000," seconds"
+
+foundWords = solver.solve(tri)
+
+for i in [0..2]
+    console.log "Solution #{i} is #{foundWords[i][0]} at #{foundWords[i][1][0]}, #{foundWords[i][1][1]}"
+    solver.printPositions(foundWords[i][1])

contents = fs.readFileSync('words/kotus/kotus_sanat.txt', 'utf8')
words = contents.split("\n").map((x) => x.trim())
board = """
TEANTAEKÄJ
AKRAUTROKI
LOPHTÖNUHN
OIJIATOÖEY
EASPNAHPKÄ
RTEOVNTHSR
PIOKTIÄYIN
AEITRURLYU
JNLIAEOIUV
NOAVTNEKSJ
UTISÄTILAU
YALMIKGPUT
POKURUÄNEK
"""
.split("\n")
.map((x) => x.trim())
.filter((x) => x.length == 10)

filterWordsByBoard = (words, board) ->
    getCharacterCount = (word) =>

            else
                #console.log "Testing ", word, positions
                if match == 2
                    foundWords.push([word, positions, @evaluate(positions)])
                    #console.log "Found word", word, positions
                neighbors = findNeighbors(lastPosition)
                #console.log "neighbors", neighbors
                potentialPositions = filterVisited(neighbors, positions)
