Coder Social home page Coder Social logo

n-puzzle's People

Contributors

0aubsq avatar tdelabro avatar

Stargazers

 avatar

Watchers

 avatar

n-puzzle's Issues

Index out of range while inputing a folder (using -f) or a 1-size n puzzle (with random settings)

(Folder)

go run n_puzzle/* -H c -f testFiles/invalids
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.readFile(0x7fffd0c25896, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/n_puzzle.go:27 +0xcf7
main.main()
        /mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/n_puzzle.go:111 +0x217
exit status 2

(1-size)

go run n_puzzle/* -i 100 -s 1 -H c
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.Generator(0x1, 0xc0000c4010, 0x6, 0x6)
        /mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/goal_generator.go:16 +0x139
main.main()
        /mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/n_puzzle.go:118 +0x306
exit status 2

Index out of range with empty file (error test 04)

./n-puzzle -f testFiles/rmarraccs_lunatic_tests/error/04_empty_file.oof
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.readFile(0x7fffecad777d, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/n_puzzle.go:27 +0xcf7
main.main()
/mnt/d/Desktop/42UltimateFolder/Projects/Npuzzle42/n_puzzle/n_puzzle.go:112 +0x387

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.