Code Monkey home page Code Monkey logo

zalanshah64 / sudoku Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 333 KB

Sudoku is a game played on a 9x9 grid where every single square is filled with a number from 1 to 9 unique to its row, column, and 3x3 subgrid. This program is a sudoku app that allows a user to generate sudoku boards, solve given boards instantly, and play randomly generated or given sudoku boards.

License: MIT License

C++ 98.62% Makefile 1.38%
cpp game puzzle puzzle-game sudoku sudoku-board sudoku-checker sudoku-game sudoku-generator sudoku-puzzle sudoku-puzzles sudoku-scanner sudoku-solution-finder sudoku-solver terminal-based terminal-game

sudoku's Introduction

Hi there, I'm Shah ๐Ÿ‘‹

I'm an Engineer, and I like helping people!

๐Ÿค Connect with me:

LinkedIn

Gmail

Stack Overflow



๐Ÿ‘จโ€๐Ÿ’ป Programming Languages:


C C++ Javascript Python Java Arduino C MATLAB



๐Ÿ‘จโ€๐Ÿ’ป Frontend Development:


HTML5 CSS3 React + React Native Redux



๐Ÿ‘จโ€๐Ÿ’ป Backend Development:


Nodejs Flask



๐Ÿ‘จโ€๐Ÿ’ป Databases:


SQLite3 Google Firebase



๐Ÿ‘จโ€๐Ÿ’ป Developer Tools:


Bash Git Visual Studio Code Vim LaTeX



๐Ÿ‘จโ€๐Ÿ’ป Operating Systems:


Windows Linux


๐Ÿ‘จโ€๐Ÿ’ป Software:


Adobe Photoshop Adobe Illustrator Figma


sudoku's People

Contributors

zalanshah64 avatar

Watchers

 avatar

sudoku's Issues

Better Makefile

Currently, the Makefile is super slow as compilation requires a lot of files now. I want to be able to compile quickly.

Restructuring the Makefile to make use of dependencies would save a lot of time.

Dealing with Flags that are Mutually Exclusive

Certain flags should not be able to be written at the same time. For example:

  • --difficulty should only be allowed to be called when --generate or --play are called
  • --generate shouldn't be callable when --play is called, and vice versa
  • --help and --version shouldn't allow any other flags to work together
  • Maybe allowing --generate and --play alongside --solve would be okay? I'm not totally sure about this idea though.

I think the best way of dealing with flags is creating a priority list, and letting one thing take priority over another (i.e. help > version > play > generate, etc), while of course ensuring there's no mutually exclusive calls.

Full Linux Integration

As I was reading through another github repository, I saw something with a .1 extension. Come to find out, this was the manual page, and it's how you can actually give Linux programs a manual in the man program. This is really cool, and I always wondered how to do it.

It made me realize, though: this entire program is just in a folder. I think it'd be a cool learning experience to make this program downloadable through sudo (or any other package manager, but I'm just familiar with sudo). I think this would be something really cool to try once I've got my program more in line with modern Linux-type programs.

-P Doesn't work

Play is a work in progress.

Play will allow you to play a sudoku board. You could either generate a random board, or you could use a board you made yourself saved as a .txt file.

Generate Probably shouldn't Require outputfile

I think it'd make more sense to have generate naturally print the generated board to the terminal, and only output it to a file when a specific flag would be called alongside it (say, for example, "-o " ?)

Possibly removing the generate required argument for the flag may make more sense altogether, though I'm not sure what I think I should do about it yet.

Let Menu Take Both Shortened and Full Commands

As of v1.1.0, the main menu only takes commands by their initial (i.e. to generate only takes "G", and to get help only takes "H"). Allowing users to print the full word would be nice.

Main Menu is Super Ugly

I'm really not happy with how the main menu looks right now. It's temporary, but creating a more appealing version of the menu is difficult.

Windows Compatibility

So this whole time I've been writing this code using WSL. That's cool and all, and I've learned that Linux is vastly superior to Windows when it comes to programming, but the issue is that I still want this program to be functional on Windows.

This sounds like a huge project in and of itself. I'm not going to prioritize Windows compatibility right now because the project isn't in a state where I'd really want to share it with people yet, but I think I should definitely start figuring out how to write C++ for Windows.

.sudokurc File

Some programs, such as Vim, allow one to write a .rc file which saves customization very easily. I think this is super cool and having the ability to customize color or automatically set difficulty would be so cool.

Quitting Takes Way too Long

When you call Q on the command, there's a pause to just show the banner one more time before it stops running the program entirely. This pause is super slow and should be shortened.

Clearing the Terminal

Right now, when you run the program, it runs the linux command "clear", and clears the entire terminal. This wouldn't be a problem, but once the program is done, the terminal has still been cleared and history is gone.

I look at programs like sl to try to figure out how they temporarily cleared the screen, but it looks like they used the curses library to do what I'm looking to do. I've always been one to shy away from libraries (probably just because I'm hard headed and would rather understand the code than just accept that it works and move on), but I may start using curses to make my life a lot easier in general, since I am basiccally creating a terminal-based GUI.

Updating selections to use arrow keys?

Okay, so as painful as the process of mathing out each square and it's colors was, there's something that just feels good about being able to use the arrow keys to move. I think maybe making all menus use arrow keys would be a really cool feature, though I'm unsure of whether or not that'd be something people would necessarily want, since it's definitely slower.

Maybe keeping the current options, but adding arrow key functionality could be the way to go?

MacOS Compilation

During version 1.3.1, when showing the project to a friend, I discovered that this project only compiles on Linux, and there are strange compilation errors regarding the enumerable type SquareStatus.

My suspicion is that it's an issue with how the .h files are being handled, though I'm unsure of why.

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.