Skip to content

Conversation

@github-classroom
Copy link

@github-classroom github-classroom bot commented Nov 17, 2024

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.

Notes for teachers

Use this PR to leave feedback. Here are some tips:

  • Click the Files changed tab to see all of the changes pushed to the default branch since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.
  • Click the Commits tab to see the commits pushed to the default branch. Click a commit to see specific changes.
  • If you turned on autograding, then click the Checks tab to see the results.
  • This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below.
    For more information about this pull request, read “Leaving assignment feedback in GitHub”.

Subscribed: @kuzmajan

Copy link

@agluszak agluszak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bardzo ładnie, kod elegancki, feature'y się zgadzają. W drugiej części będę prosił o napisanie testów. Przynajmniej jeden unit test (np. dla generatora sudoku) i przynajmniej jeden test UI (https://developer.android.com/develop/ui/compose/testing)

5/5

// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dwa razy wpisana dependencja

Comment on lines +27 to +32
implementation("org.jetbrains.exposed:exposed-core:0.41.1")
implementation("org.jetbrains.exposed:exposed-dao:0.41.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.41.1")
implementation("org.xerial:sqlite-jdbc:3.42.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

są to wszystko dość stare wersje

import com.app.ui.screens.games.MastermindScreen
import com.app.ui.screens.games.TicTacToeScreen
enum class Game {
MENU, SUDOKU, MASTERMIND, TIC_TAC_TOE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chyba lepszą nazwą byłby Screen

selectedCell?.let { (x, y) ->
if (selectedNumber != null) {
scope.launch {
val updatedBoard = updateCell(board, x, y, selectedNumber!!)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectedNumber można przypisać do jakiegoś vala i wtedy po sprawdzeniu != null nie trzeba będzie robić !!

}

// Updating board state
fun updateCell(board: SudokuBoard?, x: Int, y: Int, number: Int): Pair<SudokuBoard, Boolean> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fun updateCell(board: SudokuBoard?, x: Int, y: Int, number: Int): Pair<SudokuBoard, Boolean> {
fun updateCell(board: SudokuBoard, x: Int, y: Int, number: Int): Pair<SudokuBoard, Boolean> {

i tak nie obsługuje Pan tutaj przypadku, że board jest nullem

}

// Updating board state
fun updateCell(board: SudokuBoard?, x: Int, y: Int, number: Int): Pair<SudokuBoard, Boolean> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nie wiadomo czym jest bool w parze, dlatego polecam używać data class z nazwanymi polami

@agluszak
Copy link

Z testowania "ręcznego": brakuje mi podświetlenia które liczby wpisał użytkownik (np. innym kolorem), a zapisywanie raczej nie powinno przeładowywać planszy, tylko ew. wyświetlić jakieś powiadomienie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants