Skip to content

nespera/slitherlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlitherLink

This is code to solve Slitherlink puzzles. To run the code, you will need Java installed and then you can run it as follows:

  > ./sbt

  > runMain uk.me.chrs.slitherlink.Game 7 7 .02...0....1.23...01...2.1...30...02.3....2...33.

The parameters are height, width and then a list of the values to go in the squares. A dot is used to indicate an empty square. The output is like this, with the initial grid, then the solved grid:

   solving
   
   •  •  •  •  •  •  •  •
        0  2           0 
   •  •  •  •  •  •  •  •
                 1     2 
   •  •  •  •  •  •  •  •
     3           0  1    
   •  •  •  •  •  •  •  •
           2     1       
   •  •  •  •  •  •  •  •
        3  0           0 
   •  •  •  •  •  •  •  •
     2     3             
   •  •  •  •  •  •  •  •
     2           3  3    
   •  •  •  •  •  •  •  •
   
   
   •  •  •  •‒‒•  •  •  •
        0  2|  |       0 
   •  •  •‒‒•  •‒‒•‒‒•  •
         |       1   | 2 
   •‒‒•  •‒‒•  •  •  •‒‒•
   | 3|     |    0  1   |
   •  •‒‒•  •  •  •‒‒•‒‒•
   |     | 2|    1|      
   •  •‒‒•  •‒‒•  •  •  •
   |  | 3  0   |  |    0 
   •  •‒‒•  •‒‒•  •‒‒•  •
   | 2   | 3|        |   
   •‒‒•  •‒‒•  •‒‒•  •  •
     2|        | 3| 3|   
   •  •‒‒•‒‒•‒‒•  •‒‒•  •

About

Code to solve Slitherlink puzzles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published