Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Chess2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Sander Skogh Linnerud
Chess2
Commits
c74b6fb8
Commit
c74b6fb8
authored
1 year ago
by
Magnus Strømseng
Browse files
Options
Downloads
Patches
Plain Diff
update pumls
parent
b4378284
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#275499
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
puml/control_sequence.puml
+31
-4
31 additions, 4 deletions
puml/control_sequence.puml
puml/generated/model.puml
+5
-4
5 additions, 4 deletions
puml/generated/model.puml
with
36 additions
and
8 deletions
puml/control_sequence.puml
+
31
−
4
View file @
c74b6fb8
@startuml control sequence
@startuml control sequence
actor Player
actor Player
participant InGameView
participant InGameController
participant Game
participant Game
participant Board
participant Square
participant Piece
participant SoundStateManager
?-> Game : switchPlayer()
?-> Game : switchPlayer()
note right: Player's turn
note right: Player's turn
== Player's turn ==
== Player's turn ==
Player-> InGameView : Move Piece
Player -> InGameView : Click on a piece
activate InGameView
InGameView -> InGameController : getBoard()
InGameController -> Game : getBoard()
Game -> InGameController : board
InGameController -> InGameView : board
InGameView -> Board : getSquare()
Board -> InGameView : Square
note left: Get the valid moves for the clicked piece
InGameView -> Square : getPiece()
Square -> InGameView : Piece
InGameView -> Piece : getValidMoves()
Piece -> InGameView : List<Position>
deactivate InGameView
InGameView -> InGameController : Move Piece
Player-> InGameView : Click on a target square to move to
InGameView -> InGameController : MovePiece()
InGameController -> Game : movePiece()
InGameController -> Game : movePiece()
activate Game
activate Game
Game -> Board : movePiece()
Game -> Board : movePiece()
Board -> Square : removePiece()
Board -> Square : setPiece()
Board -> Game : update()
Board -> Game : Boolean : whether move is valid or not
Game -> Game : moves.add()
Game -> Game : moves.add()
Game -> SoundStateManager : playSound()
Board -> Game : update()
Game -> SoundStateManager : playSound()
Game -> Game : updateGameStatus()
Game -> Game : updateGameStatus()
Game -> Game : switchPlayer()
Game -> Game : switchPlayer()
deactivate Game
deactivate Game
...
...
This diff is collapsed.
Click to expand it.
puml/generated/model.puml
+
5
−
4
View file @
c74b6fb8
...
@@ -204,13 +204,14 @@ com.mygdx.game.model.Piece *-- com.mygdx.game.model.ChessPieceColor
...
@@ -204,13 +204,14 @@ com.mygdx.game.model.Piece *-- com.mygdx.game.model.ChessPieceColor
Game *-- com.mygdx.game.model.GameStatus
Game *-- com.mygdx.game.model.GameStatus
Square *-- Position
Square *-- Position
Player *-- ChessPieceColor
Player *-- ChessPieceColor
Board *-- Square : has many
Board *--
"N"
Square : has many
Game *-- Move : has many
Game *--
"0..N"
Move : has many
Game *-- Board
Game *--
"1"
Board
Piece *-- IMoveStrategy
Piece *-- IMoveStrategy
Game *-- "2" Player
: has two
Game *-- "2" Player
Player *-- Loadout
Player *-- Loadout
Loadout *-- Piece : has many
Loadout *-- Piece : has many
Square *-- "0..1" Piece
EloCalculator -- GameEndState : takes in 1
EloCalculator -- GameEndState : takes in 1
EloCalculator -- Player : takes in 2
EloCalculator -- Player : takes in 2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment