forked from mimuw-kotlin/project-paulina-x-blazej
-
Notifications
You must be signed in to change notification settings - Fork 0
Feedback #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
github-classroom
wants to merge
16
commits into
feedback
Choose a base branch
from
main
base: feedback
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feedback #1
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bb5c5fd
Setting up GitHub Classroom Feedback
github-classroom[bot] c9e0017
add deadline
github-classroom[bot] 65e9558
Update README.md
kuzmajan b60430d
Update README.md
kuzmajan bb88048
Gradle structure of the project
kuzmajan f2e70c4
Menu navigation + placeholders for games
kuzmajan 115b11a
UI for sudoku, classes for sudoku
kuzmajan b2501a5
Added connection to database, sample sudoku, formalized comments and …
kuzmajan ee09e54
Modified UI, added Popup logic (but not implemented yet)
kuzmajan c012739
Upgraded main menu
kuzmajan 7d6a609
Validation of the board, clearing the cell, minor bug fixes. Project …
kuzmajan 48409cf
Updated comments, README, minor UI fixes.
kuzmajan e66c17d
Changed the title of the window
kuzmajan 286550d
Added ktlint formatting, so the project passes ./gradlew ktlintCheck
kuzmajan f7cb2c6
Renamed package to app (cosmetic change)
kuzmajan 07a2e58
Added instructions on how to execute the application, and important n…
kuzmajan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| .gradle | ||
| build/ | ||
| !gradle/wrapper/gradle-wrapper.jar | ||
| !**/src/main/**/build/ | ||
| !**/src/test/**/build/ | ||
|
|
||
| ### IntelliJ IDEA ### | ||
| .idea/modules.xml | ||
| .idea/jarRepositories.xml | ||
| .idea/compiler.xml | ||
| .idea/libraries/ | ||
| *.iws | ||
| *.iml | ||
| *.ipr | ||
| out/ | ||
| !**/src/main/**/out/ | ||
| !**/src/test/**/out/ | ||
|
|
||
| ### Kotlin ### | ||
| .kotlin | ||
|
|
||
| ### Eclipse ### | ||
| .apt_generated | ||
| .classpath | ||
| .factorypath | ||
| .project | ||
| .settings | ||
| .springBeans | ||
| .sts4-cache | ||
| bin/ | ||
| !**/src/main/**/bin/ | ||
| !**/src/test/**/bin/ | ||
|
|
||
| ### NetBeans ### | ||
| /nbproject/private/ | ||
| /nbbuild/ | ||
| /dist/ | ||
| /nbdist/ | ||
| /.nb-gradle/ | ||
|
|
||
| ### VS Code ### | ||
| .vscode/ | ||
|
|
||
| ### Mac OS ### | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <component name="ProjectRunConfigurationManager"> | ||
| <configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle"> | ||
| <ExternalSystemSettings> | ||
| <option name="executionName"/> | ||
| <option name="externalProjectPath" value="$PROJECT_DIR$"/> | ||
| <option name="externalSystemIdString" value="GRADLE"/> | ||
| <option name="scriptParameters" value=""/> | ||
| <option name="taskDescriptions"> | ||
| <list/> | ||
| </option> | ||
| <option name="taskNames"> | ||
| <list> | ||
| <option value="run"/> | ||
| </list> | ||
| </option> | ||
| <option name="vmOptions" value=""/> | ||
| </ExternalSystemSettings> | ||
| <GradleScriptDebugEnabled>true</GradleScriptDebugEnabled> | ||
| <method v="2"/> | ||
| </configuration> | ||
| </component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,55 @@ | ||
| # Frobnicator (this is a template) | ||
| [](https://classroom.github.com/a/M0kyOMLZ) | ||
| # Aplikacja z mini-grami logicznymi | ||
|
|
||
| ## Authors | ||
| - Andrzej Głuszak (@agluszak on GitHub) | ||
| - Linus Torvalds (@torvalds on GitHub) | ||
| ## Autorzy | ||
| - Jan Kuźma | ||
|
|
||
| ## Description | ||
| Frobnicator is going to be a platformer game similar to Super Mario Bros made using Korge game engine. | ||
| ## Opis | ||
| Planuję stworzyć aplikacje desktopową zawierającą kilka mini gier logicznych, jeszcze się zastanawiam nad konkretnymi przykładami, ale będzie to coś jak sudoku/krzyżówki/mastermind itp, potencjalnie jakaś przygodowa gra tekstowa. | ||
|
|
||
| ## Features | ||
| - map generator | ||
| - shooting | ||
| - enemy AI | ||
| - game state saving and loading | ||
| - scores | ||
| ## Funkcjonalności | ||
| - gry logiczne singleplayer z kilkoma poziomami, | ||
| - ranking graczy/historia wyników, | ||
| - pomoc dla gracza (podpowiedzi/tutoriale), | ||
| - zapis stanu gry. | ||
|
|
||
| ## Plan | ||
| In the first part we're going to implement the basics: movement, physics and shooting. The enemies will simply bounce from one edge of the platform to the other. There will be only a single map. | ||
| W pierwszej części planuję storzyć obsługę ekranów startowych, menu głównego, podstawową nawigacji, jakiś przykład łamigłówki. | ||
|
|
||
| In the second part we're going to add random map generator, saving/loading, scores and a more sophisticated AI. | ||
| W drugiej części planuję dodać nowe łamigłówki, rankingi/historie wyników, wskazówki dla graczy oraz potencjalnie (jeśli wyżej wymienione punkty okażą się zbyt mało czasochłonne) tryb multiplayer (być może rozgrywany na jednym telefonie, coś aka gra turowa- np kółko i krzyżyk). Dodatkowo, po konsultacji- zostanie dodany zapis stanu gry. | ||
|
|
||
| ## Libraries | ||
| - Korge (https://korge.org/) | ||
| - kotlinx-serialization (https://github.com/Kotlin/kotlinx.serialization) | ||
| ## Biblioteki | ||
| Będzie to apliakcja desktopowa (rezygnuję z android studio), z użyciem Compose. | ||
|
|
||
| # Podsumowanie części pierwszej | ||
| Struktura projektu- w głównym folderze aplikacji znajdują się następujące komponenty: | ||
| - Main.kt, który pozwala na uruchomienie aplikacji, | ||
| - DatabaseConfig.kt, który zapewnia konfigurację połączenia z bazą danych | ||
| - populateDb.kt, który umożliwia załadowania początkowych planszy sudkou do bazy danych. Aby populować bazę danych, | ||
| należy odpowiednio zmienić kod w Main.kt (uruchomić jedynie z funkcją populate()) | ||
| - /backend/sudoku/Node.kt - deklaracja klasy pojedynczej komórki na planszy sudoku | ||
| - /backend/sudoku/SudokuBoard.kt - deklaracja klasy planszy sudoku, zawiera m.in serializacje oraz funckje sprawdzające poprawność planszy | ||
| - /backend/entities/SudokuBoards - zawiera deklaracje tabeli przechowującej sudoku | ||
| - /ui/screens/GameMenu.kt - główny widok statowego menu | ||
| - /ui/screens/games/MastermindScreen.kt - placeholder screen dla gry Mastermind | ||
| - /ui/screens/games/TickTakToe.kt - placeholder screen dla gry Kółko i Krzyżyk | ||
| - /ui/screens/games/SudokuScreen.kt - główny ekran dla sudoku, duża część implementacji | ||
| - /ui/sudokuComponents/NumberPad.kt - design dla klawiatury do wprowadzania numerków na plansze | ||
| - /ui/sudokuComponents/Popup.kt - design dla popup-ów, jeszcze nie używany | ||
| - /ui/sudokuComponents/SudokuBoardConfig.kt - konfiguracja kolorów dla planszy sudoku | ||
| - /ui/sudokuComponents/SudokuBoardUI.kt - design dla planszy sudoku | ||
|
|
||
| Aplikacja zawiera podstawową nawigacje, oraz logikę gry sudoku, wraz z przechowywaniem stanu gry w bazie danych. | ||
| Stan gry można zapisywać, chwilowo istnieje jedna plansza. Jest zaimplementowana również walidacja stanu planszy, czy | ||
| sprawdzanie wygranej gracza. | ||
|
|
||
| W projeckie użyłem takich bibliotek/funkcjonalności jal: | ||
| - Compose Desktop- było to wyzwanie, ponieważ nie omawialiśmy tego jeszcze na zajęciach, jednak praca z tą biblioteką okazała się bardzo przyjemna, | ||
| - Exposed – biblioteka służąca do obsługi połączeń z bazą danych w Kotlinie, | ||
| - Korutyny- użyte trochę na siłę, do komunikacji z bazą danych. Aby symulować dłuższą operację, ręcznie dodaję | ||
| sleep(1000) w funkcjach komunikujących się z bazą danych. | ||
|
|
||
| # Jak uruchomić aplikację? | ||
| Można wywołać polecenie ./gradlew run. Ważna notatka- w funkcji main w pliku Main.kt jest wywoływana funckja populate(). | ||
| Czyści ona lokalnie bazę danych, oraz insertuje do niej 2 plansze sudoku. Jeżeli chcemy, aby stan planszy zapisywał się | ||
| między wywołaniami aplikacji- po pierwszym uruchomieniu należy usunąć (wykomentować) tą linijkę. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import org.jetbrains.compose.desktop.application.dsl.TargetFormat | ||
|
|
||
| plugins { | ||
| kotlin("jvm") | ||
| id("org.jetbrains.compose") | ||
| id("org.jetbrains.kotlin.plugin.compose") | ||
| kotlin("plugin.serialization") version "1.6.0" | ||
| id("org.jlleitschuh.gradle.ktlint") version "11.3.2" | ||
| } | ||
|
|
||
| group = "com.app" | ||
| version = "1.0-SNAPSHOT" | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
| google() | ||
| } | ||
|
|
||
| dependencies { | ||
| // Note, if you develop a library, you should use compose.desktop.common. | ||
| // compose.desktop.currentOs should be used in launcher-sourceSet | ||
| // (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") | ||
| 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") | ||
|
Comment on lines
+27
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. są to wszystko dość stare wersje |
||
| implementation("org.slf4j:slf4j-api:2.0.16.") | ||
| implementation("org.slf4j:slf4j-simple:2.0.16") | ||
| } | ||
|
|
||
| compose.desktop { | ||
| application { | ||
| mainClass = "com.app.MainKt" | ||
|
|
||
| nativeDistributions { | ||
| targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) | ||
| packageName = "logicGames" | ||
| packageVersion = "1.0.0" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
| kotlin.code.style=official | ||
| kotlin.version=2.0.0 | ||
| compose.version=1.6.11 |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dwa razy wpisana dependencja