Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ChaosGame
Manage
Activity
Members
Labels
Plan
Issues
41
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vetle Traran Bjørnøy
ChaosGame
Merge requests
!20
#34
validate inputs in model classes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#34
validate inputs in model classes
#34-Validate-inputs-in-model-classes
into
main
Overview
0
Commits
7
Pipelines
0
Changes
17
Merged
Vetle Traran Bjørnøy
requested to merge
#34-Validate-inputs-in-model-classes
into
main
9 months ago
Overview
0
Commits
7
Pipelines
0
Changes
17
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
3fd24c26
7 commits,
9 months ago
17 files
+
257
−
80
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
src/main/java/edu/ntnu/idatt2003/controller/ChaosGameController.java
+
7
−
2
Options
package
edu.ntnu.idatt2003.controller
;
import
edu.ntnu.idatt2003.exceptions.ChaosCanvasException
;
import
edu.ntnu.idatt2003.exceptions.ChaosGameDescriptionFactoryException
;
import
edu.ntnu.idatt2003.exceptions.ChaosGameException
;
import
edu.ntnu.idatt2003.model.game.ChaosGame
;
import
edu.ntnu.idatt2003.model.game.ChaosGameDescription
;
import
edu.ntnu.idatt2003.model.game.ChaosGameDescriptionFactory
;
@@ -24,13 +27,15 @@ public class ChaosGameController implements Observer {
* @param width the width of the canvas.
* @param height the height of the canvas.
*/
public
ChaosGameController
(
ViewCanvas
viewCanvas
,
int
width
,
int
height
)
{
public
ChaosGameController
(
ViewCanvas
viewCanvas
,
int
width
,
int
height
)
throws
ChaosGameDescriptionFactoryException
,
ChaosGameException
,
ChaosCanvasException
{
this
.
viewCanvas
=
viewCanvas
;
chaosGame
=
new
ChaosGame
(
ChaosGameDescriptionFactory
.
get
(
"Julia Set"
),
width
,
height
);
chaosGame
.
attach
(
this
);
}
public
void
resetChaosGameWithDescription
(
String
description
)
{
public
void
resetChaosGameWithDescription
(
String
description
)
throws
ChaosGameDescriptionFactoryException
,
ChaosGameException
{
ChaosGameDescription
newDescription
=
ChaosGameDescriptionFactory
.
get
(
description
);
chaosGame
.
resetGameWithDescription
(
newDescription
);
}
Loading