diff --git a/.metadata/.lock b/.metadata/.lock
new file mode 100644
index 0000000..e69de29
diff --git a/.metadata/.log b/.metadata/.log
new file mode 100644
index 0000000..bea1e23
--- /dev/null
+++ b/.metadata/.log
@@ -0,0 +1,53 @@
+!SESSION 2024-04-10 15:05:50.176 -----------------------------------------------
+eclipse.buildId=4.22.0.I20211124-1800
+java.version=16.0.1
+java.vendor=Oracle Corporation
+BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
+Framework arguments: -product org.eclipse.epp.package.java.product
+Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
+
+!ENTRY org.eclipse.jface 2 0 2024-04-10 15:06:13.933
+!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
+!SUBENTRY 1 org.eclipse.jface 2 0 2024-04-10 15:06:13.933
+!MESSAGE A conflict occurred for CTRL+SHIFT+T:
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
+ Open a type in a Java editor,
+ Category(org.eclipse.ui.category.navigate,Navigate,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@1b7a4930,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
+ ,
+ Category(org.eclipse.lsp4e.category,Language Servers,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@591a4d25,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+!SUBENTRY 1 org.eclipse.jface 2 0 2024-04-10 15:06:13.933
+!MESSAGE A conflict occurred for ALT+SHIFT+R:
+Binding(ALT+SHIFT+R,
+ ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.rename.element,Rename - Refactoring ,
+ Rename the selected element,
+ Category(org.eclipse.jdt.ui.category.refactoring,Refactor - Java,Java Refactoring Actions,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@4bfe83d,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+Binding(ALT+SHIFT+R,
+ ParameterizedCommand(Command(org.eclipse.ui.edit.rename,Rename,
+ Rename the selected item,
+ Category(org.eclipse.ui.category.file,File,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@5906ebfb,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+
+!ENTRY org.eclipse.egit.ui 2 0 2024-04-10 15:06:19.085
+!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
+user global configuration and to define the default location to store repositories: 'C:\Users\LEN'. If this is
+not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
+EGit might behave differently since they see different configuration options.
+This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location
new file mode 100644
index 0000000..db1eaed
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location differ
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
new file mode 100644
index 0000000..25cb955
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
new file mode 100644
index 0000000..5897676
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
new file mode 100644
index 0000000..6b2aaa7
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree
new file mode 100644
index 0000000..40b3de9
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
new file mode 100644
index 0000000..9903e8d
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dffc6b5
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+version=1
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..81069d7
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,8 @@
+content_assist_proposals_background=255,255,255
+content_assist_proposals_foreground=0,0,0
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.formatterprofiles.version=21
+spelling_locale_initialized=true
+typefilter_migrated_2=true
+useAnnotationsPrefPage=true
+useQuickDiffPrefPage=true
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs
new file mode 100644
index 0000000..d56c53f
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jsch.core.hasChangedDefaultWin32SshHome=true
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs
new file mode 100644
index 0000000..67b1d96
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.m2e.discovery.pref.projects=
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
new file mode 100644
index 0000000..b51873b
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+platformState=1643645456896
+quickStart=false
+tipsAndTricks=true
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
new file mode 100644
index 0000000..08076f2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+showIntro=false
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
new file mode 100644
index 0000000..b85d0db
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
@@ -0,0 +1,9 @@
+//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
+PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery;
+eclipse.preferences.version=1
+org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_END=255,255,255
+org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_START=255,255,255
+org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_TEXT_COLOR=16,16,16
+org.eclipse.ui.workbench.ACTIVE_TAB_BG_END=255,255,255
+org.eclipse.ui.workbench.ACTIVE_TAB_BG_START=255,255,255
+org.eclipse.ui.workbench.INACTIVE_TAB_BG_START=242,242,242
diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.urischeme.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.urischeme.prefs
new file mode 100644
index 0000000..855d634
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.urischeme.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+processedSchemes=,eclipse+command,eclipse+mpc
diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
new file mode 100644
index 0000000..f9a48db
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
@@ -0,0 +1,2300 @@
+
+
+
+ activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration
+
+
+
+
+
+
+
+ topLevel
+ shellMaximized
+
+
+
+
+ persp.actionSet:org.eclipse.ui.cheatsheets.actionSet
+ persp.actionSet:org.eclipse.search.searchActionSet
+ persp.actionSet:org.eclipse.text.quicksearch.actionSet
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation
+ persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo
+ persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet
+ persp.actionSet:org.eclipse.ui.actionSet.keyBindings
+ persp.actionSet:org.eclipse.ui.actionSet.openFiles
+ persp.actionSet:org.eclipse.wb.core.ui.actionset
+ persp.actionSet:org.eclipse.debug.ui.launchActionSet
+ persp.actionSet:org.eclipse.jdt.ui.JavaActionSet
+ persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet
+ persp.actionSet:org.eclipse.ui.NavigateActionSet
+ persp.viewSC:org.eclipse.jdt.ui.PackageExplorer
+ persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy
+ persp.viewSC:org.eclipse.jdt.ui.SourceView
+ persp.viewSC:org.eclipse.jdt.ui.JavadocView
+ persp.viewSC:org.eclipse.search.ui.views.SearchView
+ persp.viewSC:org.eclipse.ui.console.ConsoleView
+ persp.viewSC:org.eclipse.ui.views.ContentOutline
+ persp.viewSC:org.eclipse.ui.views.ProblemView
+ persp.viewSC:org.eclipse.ui.views.ResourceNavigator
+ persp.viewSC:org.eclipse.ui.views.TaskList
+ persp.viewSC:org.eclipse.ui.views.ProgressView
+ persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer
+ persp.viewSC:org.eclipse.ui.texteditor.TemplatesView
+ persp.viewSC:org.eclipse.pde.runtime.LogView
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewRecordCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard
+ persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard
+ persp.newWizSC:org.eclipse.ui.wizards.new.folder
+ persp.newWizSC:org.eclipse.ui.wizards.new.file
+ persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard
+ persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective
+ persp.perspSC:org.eclipse.debug.ui.DebugPerspective
+ persp.showIn:org.eclipse.jdt.ui.PackageExplorer
+ persp.showIn:org.eclipse.team.ui.GenericHistoryView
+ persp.showIn:org.eclipse.ui.navigator.ProjectExplorer
+ persp.actionSet:org.eclipse.debug.ui.breakpointActionSet
+ persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet
+ persp.showIn:org.eclipse.egit.ui.RepositoriesView
+ persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet
+ persp.showIn:org.eclipse.eclemma.ui.CoverageView
+ persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView
+ persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView
+ persp.viewSC:org.eclipse.wb.core.StructureView
+ persp.viewSC:org.eclipse.wb.core.PaletteView
+ persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard
+ persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet
+ persp.viewSC:org.eclipse.ant.ui.views.AntView
+
+
+
+ org.eclipse.e4.primaryNavigationStack
+
+ View
+ categoryTag:Java
+
+
+ View
+ categoryTag:Java
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+
+
+
+ org.eclipse.e4.secondaryNavigationStack
+ active
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Ant
+
+
+
+
+ org.eclipse.e4.secondaryDataStack
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Java
+
+
+ View
+ categoryTag:Java
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:General
+
+
+ View
+ categoryTag:Terminal
+
+
+
+
+
+
+
+
+ View
+ categoryTag:Help
+
+
+ View
+ categoryTag:Help
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+
+ View
+ categoryTag:General
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+ org.eclipse.e4.primaryDataStack
+ EditorStack
+
+
+
+
+
+
+ View
+ categoryTag:Java
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+ View
+ categoryTag:General
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+
+ View
+ categoryTag:General
+ active
+ activeOnClose
+
+ ViewMenu
+ menuContribution:menu
+
+
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Terminal
+
+
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Ant
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ Draggable
+
+
+ Draggable
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+
+ toolbarSeparator
+
+
+
+ toolbarSeparator
+
+
+
+ Draggable
+
+
+ stretch
+ SHOW_RESTORE_MENU
+
+
+ Draggable
+ HIDEABLE
+ SHOW_RESTORE_MENU
+
+
+
+
+ stretch
+
+
+ Draggable
+
+
+ Draggable
+
+
+
+
+ TrimStack
+ Draggable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ platform:win32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ platform:win32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ View
+ Spy
+ categoryTag:Eclipse Runtime Spies
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor
+ removeOnHide
+
+
+
+
+ View
+ categoryTag:Gradle
+
+
+
+
+ View
+ categoryTag:Gradle
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Ant
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Git
+ NoRestore
+
+
+
+
+ View
+ categoryTag:Git
+
+
+
+
+ View
+ categoryTag:Help
+
+
+
+
+ View
+ categoryTag:Debug
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java Browsing
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Java
+
+
+
+
+ View
+ categoryTag:Maven
+
+
+
+
+ View
+ categoryTag:Maven
+
+
+
+
+ View
+ categoryTag:Oomph
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:Version Control (Team)
+
+
+
+
+ View
+ categoryTag:Version Control (Team)
+
+
+
+
+ View
+ categoryTag:Terminal
+
+
+
+
+ View
+ categoryTag:Other
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:General
+
+
+
+
+ View
+ categoryTag:API Tools
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:Plug-in Development
+
+
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+
+
+ View
+ categoryTag:WindowBuilder
+
+
+
+ glue
+ move_after:PerspectiveSpacer
+ SHOW_RESTORE_MENU
+
+
+ move_after:Spacer Glue
+ HIDEABLE
+ SHOW_RESTORE_MENU
+
+
+ glue
+ move_after:SearchField
+ SHOW_RESTORE_MENU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project
new file mode 100644
index 0000000..3c10856
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.project
@@ -0,0 +1,11 @@
+
+
+ .org.eclipse.egit.core.cmp
+
+
+
+
+
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt
new file mode 100644
index 0000000..8586397
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt
@@ -0,0 +1 @@
+java
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
new file mode 100644
index 0000000..593f470
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
new file mode 100644
index 0000000..3de398e
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
new file mode 100644
index 0000000..a4ee3cb
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
new file mode 100644
index 0000000..9e390f5
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
new file mode 100644
index 0000000..25f30e6
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
@@ -0,0 +1,10 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log
new file mode 100644
index 0000000..1ce4f5b
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log
@@ -0,0 +1 @@
+2024-04-10 15:06:18,970 [Worker-0: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update.
diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml
new file mode 100644
index 0000000..4512556
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.16.3.20211002-1029.xml
@@ -0,0 +1,41 @@
+
+
+
+ %date [%thread] %-5level %logger{35} - %msg%n
+
+
+ OFF
+
+
+
+
+ ${org.eclipse.m2e.log.dir}/0.log
+
+ ${org.eclipse.m2e.log.dir}/%i.log
+ 1
+ 10
+
+
+ 100MB
+
+
+ %date [%thread] %-5level %logger{35} - %msg%n
+
+
+
+
+
+ WARN
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
new file mode 100644
index 0000000..1f73e14
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
@@ -0,0 +1,6 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties
new file mode 100644
index 0000000..9ac8a47
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties
@@ -0,0 +1,2 @@
+#Cached timestamps
+#Wed Apr 10 15:06:53 CEST 2024
diff --git a/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml
new file mode 100644
index 0000000..5ca0b77
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml
@@ -0,0 +1,3 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.ui.intro/introstate b/.metadata/.plugins/org.eclipse.ui.intro/introstate
new file mode 100644
index 0000000..02f134f
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.ui.intro/introstate
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
new file mode 100644
index 0000000..2b035ff
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.metadata/version.ini b/.metadata/version.ini
new file mode 100644
index 0000000..e9c01f7
--- /dev/null
+++ b/.metadata/version.ini
@@ -0,0 +1,3 @@
+#Wed Apr 10 15:06:11 CEST 2024
+org.eclipse.core.runtime=2
+org.eclipse.platform=4.22.0.v20211124-1800
diff --git a/src/backend/Grid.java b/src/backend/Grid.java
new file mode 100644
index 0000000..fc8add5
--- /dev/null
+++ b/src/backend/Grid.java
@@ -0,0 +1,20 @@
+package backend;
+
+public class Grid {
+ int[][] grid;
+
+ public Grid(int xSize,int ySize) {
+ grid = new int[xSize][ySize];
+ }
+
+ public int getValueCell(int x,int y) {
+ return grid[x][y];
+ }
+ public void setValueCell(int x,int y,int a) {
+ grid[x][y]=a;
+
+ }
+
+
+
+}
diff --git a/src/backend/Simulator.java b/src/backend/Simulator.java
index 6d219ed..0c3b962 100644
--- a/src/backend/Simulator.java
+++ b/src/backend/Simulator.java
@@ -1,6 +1,6 @@
package backend;
-
import java.util.ArrayList;
+import java.util.List;
import windowInterface.MyInterface;
@@ -12,10 +12,8 @@ public class Simulator extends Thread {
private final int LINE_NUM = 100;
private final int LIFE_TYPE_NUM = 4;
//Conway Radius : 1
- private final int CONWAY_RADIUS = 1;
private final int LIFE_AREA_RADIUS = 1;
//Animal Neighborhood Radius : 5
- private final int ANIMAL_NEIGHBORHOOD_RADIUS = 5 ;
private final int ANIMAL_AREA_RADIUS = 2;
private ArrayList fieldSurviveValues;
private ArrayList fieldBirthValues;
@@ -25,9 +23,11 @@ public class Simulator extends Thread {
private boolean stopFlag;
private boolean pauseFlag;
private boolean loopingBorder;
- private boolean clickActionFlag;
+ private String clickActionFlag;
private int loopDelay = 150;
+
private Grid grid;
+
//TODO : add missing attribute(s)
public Simulator(MyInterface mjfParam) {
@@ -35,32 +35,26 @@ public class Simulator extends Thread {
stopFlag=false;
pauseFlag=false;
loopingBorder=false;
- clickActionFlag=false;
+ clickActionFlag="CellMode";
agents = new ArrayList();
- fieldBirthValues = new ArrayList();
- fieldSurviveValues = new ArrayList();
- grid = new Grid(COL_NUM,LINE_NUM);
+ fieldSurviveValues = new ArrayList<>();
+ fieldSurviveValues.add(2);
+ fieldSurviveValues.add(3);
- //TODO : add missing attribute initialization
-
-
-
- //Default rule : Survive always, birth never
- for(int i =0; i<9; i++) {
- fieldSurviveValues.add(i);
- }
+ fieldBirthValues = new ArrayList<>();
+ fieldBirthValues.add(3);
+
+ grid = new Grid(LINE_NUM, COL_NUM);
}
public int getWidth() {
- //TODO : replace with proper return
- return COL_NUM;
+ return LINE_NUM;
}
public int getHeight() {
- //TODO : replace with proper return
- return LINE_NUM;
+ return COL_NUM;
}
//Should probably stay as is
@@ -124,11 +118,68 @@ public class Simulator extends Thread {
* then the cell becomes alive
*/
-
-
-
+ Grid nextGrid = new Grid(LINE_NUM, COL_NUM);
+
+ // Iterate over each cell in the grid
+ for (int i = 0; i < LINE_NUM; i++) {
+ for (int j = 0; j < COL_NUM; j++) {
+ int liveNeighbors = countLiveNeighbors(i, j);
+
+ if (getCell(i, j) == 1) {
+ if (fieldSurviveValues.contains(liveNeighbors)) {
+ nextGrid.setValueCell(i, j, 1);
+ } else {
+ nextGrid.setValueCell(i, j, 0);
+ }
+ } else {
+ if (fieldBirthValues.contains(liveNeighbors)) {
+ nextGrid.setValueCell(i, j, 1);
+ } else {
+ nextGrid.setValueCell(i, j, 0);
+ }
+ }
+ }
+ }
+
+ grid = nextGrid;
+
}
+ /*
+ * method called to count living cells around one
+ */
+ public int countLiveNeighbors(int x, int y) {
+ int liveNeighbors = 0;
+
+ for (int i = -LIFE_AREA_RADIUS; i <= LIFE_AREA_RADIUS; i++) {
+ for (int j = -LIFE_AREA_RADIUS; j <= LIFE_AREA_RADIUS; j++) {
+ if (i == 0 && j == 0) continue; // Skip the current cell
+
+ int neighborX = x + i;
+ int neighborY = y + j;
+
+ if (loopingBorder) {
+ // Wrap around the edges
+ if (neighborX < 0) neighborX = LINE_NUM - 1;
+ else if (neighborX >= LINE_NUM) neighborX = 0;
+
+ if (neighborY < 0) neighborY = COL_NUM - 1;
+ else if (neighborY >= COL_NUM) neighborY = 0;
+ }
+
+ if (neighborX >= 0 && neighborX < LINE_NUM && neighborY >= 0 && neighborY < COL_NUM) {
+ if (getCell(neighborX, neighborY) == 1) {
+ liveNeighbors++;
+ }
+ }
+ }
+ }
+
+ return liveNeighbors;
+ }
+
+
+
/*
* leave this as is
*/
@@ -140,8 +191,12 @@ public class Simulator extends Thread {
* method called when clicking pause button
*/
public void togglePause() {
- // TODO : actually toggle the corresponding flag
- pauseFlag = !pauseFlag;
+ if (pauseFlag == true ) {
+ pauseFlag=false;
+ }
+ else {
+ pauseFlag=true;
+ }
}
/**
@@ -149,9 +204,14 @@ public class Simulator extends Thread {
*/
public void clickCell(int x, int y) {
//TODO : complete method
-
- getCell(x,y);
-
+ if (clickActionFlag=="CellMode") {
+ if (grid.getValueCell(x, y)==1) {
+ this.setCell(x, y, 0);
+ }
+ else {
+ this.setCell(x, y, 1);
+ }
+ }
}
/**
@@ -161,9 +221,7 @@ public class Simulator extends Thread {
* @return value of cell
*/
public int getCell(int x, int y) {
- //TODO : complete method with proper return
-
- return grid.getValueCell(x,y);
+ return grid.getValueCell(x, y);
}
/**
*
@@ -197,8 +255,7 @@ public class Simulator extends Thread {
* @param val to set in cell
*/
public void setCell(int x, int y, int val) {
- //TODO : complete method
- grid.setValueCell(x,y,val);
+ grid.setValueCell(x, y, val);
}
/**
@@ -207,8 +264,19 @@ public class Simulator extends Thread {
* the simulated world in its present state
*/
public ArrayList getSaveState() {
- //TODO : complete method with proper return
- return null;
+ ArrayList saveState = new ArrayList<>();
+
+ for (int i = 0; i < LINE_NUM; i++) {
+ StringBuilder line = new StringBuilder();
+ for (int j = 0; j < COL_NUM; j++) {
+ line.append(grid.getValueCell(i, j));
+ if (j < COL_NUM - 1) {
+ line.append(";");
+ }
+ }
+ saveState.add(line.toString());
+ }
+ return saveState;
}
/**
*
@@ -251,35 +319,40 @@ public class Simulator extends Thread {
* to be alive in new state
*/
public void generateRandom(float chanceOfLife) {
- //TODO : complete method
- /*
- * Advice :
- * as you should probably have a separate class
- * representing the field of cells...
- * maybe just make a constructor in there
- * and use it here
- */
+ for (int i = 0; i < LINE_NUM; i++) {
+ for (int j = 0; j < COL_NUM; j++) {
+ float randomValue = (float) Math.random();
+ if (randomValue <= chanceOfLife) {
+ grid.setValueCell(i, j, 1);
+ } else {
+ grid.setValueCell(i, j, 0);
+ }
+ }
+ }
}
public boolean isLoopingBorder() {
- //TODO : complete method with proper return
return loopingBorder;
}
public void toggleLoopingBorder() {
- loopingBorder = !loopingBorder ;
-
- //TODO : complete method
+ if (isLoopingBorder() == true) {
+ loopingBorder=false;
+ }else {
+ loopingBorder=true;
+ }
}
public void setLoopDelay(int delay) {
- loopDelay = delay;
- //TODO : complete method
+ loopDelay=delay;
}
public void toggleClickAction() {
//TODO : complete method
+ if (clickActionFlag=="CellMode") {
+
+ }
}
/**
@@ -292,8 +365,12 @@ public class Simulator extends Thread {
*/
public ArrayList getRule() {
//TODO : complete method with proper return
+ ArrayList rule = new ArrayList<>();
- return null;
+ rule.add(String.join(";", fieldSurviveValues.stream().map(Object::toString).toArray(String[]::new)));
+ rule.add(String.join(";", fieldBirthValues.stream().map(Object::toString).toArray(String[]::new)));
+
+ return rule;
}
public void loadRule(ArrayList lines) {
@@ -301,8 +378,9 @@ public class Simulator extends Thread {
System.out.println("empty rule file");
return;
}
- //TODO : remove previous rule (=emptying lists)
-
+
+ fieldSurviveValues.clear();
+ fieldBirthValues.clear();
String surviveLine = lines.get(0);
String birthLine = lines.get(1);
@@ -310,14 +388,14 @@ public class Simulator extends Thread {
for(int x=0; x