Make a Sudoku Solver App! | How to make a Sudoku solver in Android Studio | Part 2

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2020
  • In this video, you will learn how to create an app that is capable of solving Sudoku puzzles in Android Studio using Java. This Sudoku puzzle solver will be able to solve any puzzle you put into it quickly. We will be utilizing backtracking as the core of our puzzle-solving logic.
    We will be covering some of the core functions and techniques used for app development in Android Studio. This tutorial is designed for beginners trying to get started in app development with Android devices being the primary target.
    Android Studio is a great platform for creating apps that can be deployed on the google play store. If you're new to the series I'd go and check out the Android Studio Playlist. There you will be able to see how to create basic apps so you can become a developer.
    Join the Discord Server!!!
    / discord
    Check out the Android development playlist for more videos like this!
    • Android App Developmen...
    #androidstudio #appdevelopment #PracticalCoding
  • ХоббиХобби

Комментарии • 26

  • @Shengdanya
    @Shengdanya 2 года назад

    This method is so much better!! I had initially made 81 edittext to make the board. Such a stupid method. I didn't know we can make our own views. Thank you so much!!

    • @PracticalCoding
      @PracticalCoding  2 года назад

      That's crazy! When I first worked on this app, I thought about doing the same thing but it seemed wrong. Looked into it some more and found out you could make custom views. Glad you found my video to help you out!

  • @scyye-gaming
    @scyye-gaming Год назад

    Heyo!
    you dont actually need 2 methods for drawing the line. the following works well:
    private void drawLine(boolean thick) {
    int thickness=thick?10:4;
    boardColorPaint.setStyle(Paint.Style.STROKE);
    boardColorPaint.setStrokeWidth(thickness);
    boardColorPaint.setColor(boardColor);
    }

  • @ashokg5878
    @ashokg5878 Год назад +1

    Hi @Practical Coding hope you are doing well. I've implemented all points and looking for notes part(like pencil marks) to enter in a cell. My request, could you please make a video on the notes or give me some suggestion, it helps me a lot as I'm unable to do and have been trying it for last few days to implement notes in a selected cell but no luck. I had posted about it on stackoverflow and you can search it for more information - How to enter Sudoku game notes in a 9x9 cell - Android studio

  • @yosifsamir8918
    @yosifsamir8918 2 года назад

    hey man you are the legend

  • @simongatuz
    @simongatuz 2 года назад

    I've copied your code from top to bottom (obviously the file location isn't the same), everything is working except when I start clicking the cells nothing is being highlighted when I run the app.

  • @vipulsharma9094
    @vipulsharma9094 3 года назад

    hello , could you explain in short why are we dividing x and y coordinates with the cellSize in Math.ceil() function thanks.

    • @PracticalCoding
      @PracticalCoding  3 года назад +4

      The reason why we divided the x and y coordinates by whatever our cellSize happens to be is that the x and y coordinates are going to be a "large" inconstant number. So, for example, let's say the user clicked in row 2 column 3 and we have a cell size of 100. When the user clicks the cell, the x and y coordinate might be something like x = 230 and y = 167. We can't really do anything with this information directly, so this is when dividing by the cellSize comes in. Remember, in this case, our cell size is 100 so when we divide by the cellSize x=2.3 and y=1.67. Then with the Math.ceil function, those values become x=3 and y=2 which matches exactly with the cell the user clicked (row 2 column 3). The nice thing about this is that when the user clicks the same cell again, chances are it won't be in the exact same spot. That's why I mentioned the values being a "large" inconsistent number. So, again, we might end up with x=283 and y=109 when the user clicks the cell again. Now, when we divide by the cellSize x=2.83 and y=1.09. Then, with the rounding, the values of the variables again become x=3 and y=2.
      Hope that helps!

  • @hernaldovaleriopineda5455
    @hernaldovaleriopineda5455 2 года назад

    is there a reason why it works in one device and no in another?
    it happened to me that in one device show me the grid fine but when I click doesn't show me the color neither the block selected.
    otherwise, in other device doesn´t show me the grid correctly but the click action works fine.
    ?

  • @ashokg5878
    @ashokg5878 2 года назад

    Hi, thank you for your coding videos.
    I'm trying to add some functions to the code but couldn't succeed. Could you please help me in this regard.
    I made auto fill some cells to the board to solve remaining empty cells. I'm trying to add some functions to the game as below:
    1) How to erase entered cell number in empty box(unlocked) - I tried to write code but when I click erase button the already filled(locked) cells also erasing on cell selection.
    2) How to implement Undo and Redo on button clicks - I tried using Arraylist but I couldn't succeed.
    3) How to implement Hints for empty cells.
    Please help me and try to make a video on this that would be very helpful. I have been trying to get them for last few days and finally I decided to get help from you. Looking forward for help..
    Once again your explanation and videos are excellent and thank you for your support.

  • @HimanshuSingh-ys8rg
    @HimanshuSingh-ys8rg 2 года назад

    Hey whenever I click anywhere on board only 3rd row gets highlighted all in light blue no columns gets highlighted and no cell gets highlighted in dark blue.

    • @PracticalCoding
      @PracticalCoding  2 года назад

      You most likely have a typo somewhere in your code. If you check my GitHub page you should be able to see what I used. Let me know if you're still running into the issue after you checked that

  • @ChadEricCartman
    @ChadEricCartman 3 года назад

    My man do a tic tac toe next.

    • @PracticalCoding
      @PracticalCoding  3 года назад

      That would be pretty cool! I'll add it to the list

    • @sac8632
      @sac8632 3 года назад

      when will this series end bro? how many parts are there

    • @PracticalCoding
      @PracticalCoding  3 года назад

      @@sac8632 I'm not sure. The next part was supposed to be out a few days ago but it turned out to be a much longer video than I expected. I would say at least 2 more parts possibly three depending on how many videos I use to explain the code that actually solves the puzzle.

  • @topalaandreea1374
    @topalaandreea1374 3 года назад

    hello, i follow all the steps but nothing happens on click

    • @PracticalCoding
      @PracticalCoding  3 года назад

      Could you upload your code to GitHub so I can take a look at it?

  • @RedHead_Dev
    @RedHead_Dev 2 года назад

    My cells are not changing color when I tap.

    • @RedHead_Dev
      @RedHead_Dev 2 года назад

      You flipped the two colors and the code should be this instead,
      canvas.drawRect((c-1)*cellSize, (r-1)*cellSize, c*cellSize, r*cellSize, this needs to be set to
      ---> cellFillColorPaint);

  • @rahulnavgire2461
    @rahulnavgire2461 3 года назад

    give your social media handle / instagram

    • @PracticalCoding
      @PracticalCoding  3 года назад

      I have my Instagram linked on the channel homepage. Just look up _jasonsubick on Instagram and you should be able to find me

    • @rahulnavgire2461
      @rahulnavgire2461 3 года назад

      @@PracticalCoding okay