potatochick2020 / Sudoku-core

A C++ library for generating, validating, solving, checking, etc Sudoku puzzle.
MIT License
9 stars 3 forks source link

Reorganize code using OOP approach #2

Closed potatochick2020 closed 2 years ago

potatochick2020 commented 2 years ago

This is my first CPP project, I don't think I wrote OOP code properly.

MMostafa-Hub commented 2 years ago

I've done some projects in c/c++ and I have some experience in oop, and I can help you with that. I think I can resolve this issue by the end of this week, is that good for you?

potatochick2020 commented 2 years ago

Do you mind discuss about how you think you could improve this before you start coding?

MMostafa-Hub commented 2 years ago

at the first look, I have a couple of suggestions,

  1. put the class into a separate file
  2. make a super abstract class Board, with width, length attributes and draw and setBoard methods
    • make a class Sudoku that inherits from Board
    • so we separate the logic of the game and rendering of the board
    • and maybe after that we can extend the app for any size of sudoku or any board games in general by making a board class
  3. try to refactor the functions by making a smaller helper functions and macros

if there's anything I didn't consider please let me know.

potatochick2020 commented 2 years ago

goood! I will assign this issue to you

potatochick2020 commented 2 years ago

Wish you having fun in hacktoberfest ! Thank you!

potatochick2020 commented 2 years ago

Do u mind telling how you plan to improve it in terms of OOP before you start coding any thing

取得 iOS 版 Outlookhttps://aka.ms/o0ukef


寄件者: Mohamed Mostafa @.> 寄件日期: Tuesday, October 4, 2022 9:03:34 PM 收件者: potatochick2020/Sudoku-core @.> 副本: NOK @.>; Author @.> 主旨: Re: [potatochick2020/Sudoku-core] Reorganize code using OOP approach (Issue #2)

I've done some projects in c/c++ and I have some experience in oop, and I can help you with that. I think I can resolve this issue by the end of this week, is that good for you?

— Reply to this email directly, view it on GitHubhttps://github.com/potatochick2020/Sudoku-core/issues/2#issuecomment-1267516124, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWCNJZI3UWNOI6PSOMW56MTWBSERNANCNFSM6AAAAAAQ4OD6GA. You are receiving this because you authored the thread.Message ID: @.***>