Skip to content

lowerednonce/60lminesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

60lminesweeper

what?

This is a CLI minesweeper application written in 60 LoC python. You can use d row,column to dig and f row,column to flag/unflag

okay, but why?

A few days ago I had the following conversation with my friends:

  • "I mean, minesweeper is easy, I can do it in 60 lines"
  • "Naaaah, it'll take more lines"
  • "I'll do it in 60 lines of python code, where I can only use 5 instructions per line"
  • "OK, do it"

So that's why

what are the files?

Filename Purpose
main.py the program with the most features under 60 LoC
main-min.py the program with the least amount of LoC while having the functionality of the minesweeper
main-readable.py main.py but readable and commented
main-min-readable.py main-min.py but readable and commented

what are the criteria?

This is arbitrary, but the criteria is the following:

  • under 60 LoC
  • no base64 packed code
  • no eval() or exec()
  • no reading other files for code
  • no importing non-default libraries, default libraries can be os in python or string in C
  • maximum 5 instructions per line, meaning only 4 ; per line
  • features:
    • be able to dig
    • be able to flag
    • can die or win
    • display map, but only display digged fields

About

Minesweeper in 60 LoC. Made it when I was challanged by my friends to do it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages