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
92c37b08
Commit
92c37b08
authored
1 year ago
by
Magnus Strømseng
Browse files
Options
Downloads
Patches
Plain Diff
update generated pumls
parent
3f9f5e9f
No related branches found
No related tags found
No related merge requests found
Pipeline
#275487
passed
1 year ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
puml/generated/controller.puml
+2
-1
2 additions, 1 deletion
puml/generated/controller.puml
puml/generated/model.puml
+0
-282
0 additions, 282 deletions
puml/generated/model.puml
puml/generated/view.puml
+8
-0
8 additions, 0 deletions
puml/generated/view.puml
with
10 additions
and
283 deletions
puml/generated/controller.puml
+
2
−
1
View file @
92c37b08
...
@@ -122,7 +122,8 @@ class com.mygdx.game.controller.SoundManager {
...
@@ -122,7 +122,8 @@ class com.mygdx.game.controller.SoundManager {
}
}
com.mygdx.game.controller.ControllerStateManager <|-- com.mygdx.game.controller.ControllerState
com.mygdx.game.controller.GameLobbyController <|-- com.mygdx.game.controller.Configuration
com.mygdx.game.controller.ControllerState <|-- com.mygdx.game.controller.InGameController
com.mygdx.game.controller.ControllerState <|-- com.mygdx.game.controller.InGameController
com.mygdx.game.controller.ControllerState <|-- com.mygdx.game.controller.LeaderboardController
com.mygdx.game.controller.ControllerState <|-- com.mygdx.game.controller.LeaderboardController
...
...
This diff is collapsed.
Click to expand it.
puml/generated/model.puml
deleted
100644 → 0
+
0
−
282
View file @
3f9f5e9f
@startuml
class com.mygdx.game.model.moves.KnightMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.moves.RookMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.moves.PawnMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.moves.PhoenixMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.pieces.Thief {
+ String getName()
}
class com.mygdx.game.model.pieces.King {
+ String getName()
}
class com.mygdx.game.model.ChessPieceFactory {
+ {static} Piece createPiece(String,ChessPieceColor,Board)
+ {static} Piece createPiece(Piece)
}
class com.mygdx.game.model.Position {
- int x
- int y
+ int getX()
+ int getY()
+ boolean equals(Position)
+ boolean equals(Object)
+ String toString()
}
class com.mygdx.game.model.moves.SnakeMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.moves.BishopMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.board.Loadout {
- Piece[][] pieces
+ String toString()
+ void printLoadoutWithHeaders()
+ Piece[][] getPieces()
+ {static} void main(String[])
}
class com.mygdx.game.model.pieces.Rook {
+ String getName()
}
class com.mygdx.game.model.player.EloCalculator {
~ {static} int K
~ {static} int K2
- {static} float ExpectedScore(float,float)
+ {static} ArrayList<Integer> Calculate2Player(float,float,GameEndState)
+ {static} void main(String[])
}
enum com.mygdx.game.model.player.GameEndState {
+ WIN
+ LOSE
+ DRAW
}
enum com.mygdx.game.model.GameStatus {
+ ACTIVE
+ CHECKMATE
+ STALEMATE
}
class com.mygdx.game.model.pieces.Snake {
+ String getName()
}
class com.mygdx.game.model.player.Player {
- String name
- int time
- Loadout loadout
- Long elo
- Piece.ChessPieceColor color
+ Piece.ChessPieceColor getColor()
+ void setColor(Piece.ChessPieceColor)
+ String getName()
+ Long getElo()
+ void setElo(Long)
+ boolean decreaseTime()
+ void setTime(int)
+ String getRemainingTimeString()
}
class com.mygdx.game.model.pieces.Bishop {
+ String getName()
}
interface com.mygdx.game.model.moves.IMoveStrategy {
~ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.pieces.Knight {
+ String getName()
}
class com.mygdx.game.model.board.Move {
- Position fromPosition
- Position toPosition
- Piece pieceMoved
- Piece pieceCaptured
- Board boardState
+ String toString()
+ Board getBoardState()
+ Position getFromPosition()
+ Position getToPosition()
}
class com.mygdx.game.model.Game {
- {static} Game instance
- Player currentPlayer
- List<Player> players
- int mapSize
- int time
- GameStatus gameStatus
- ArrayList<Move> moves
- int currentPlayerIndex
- Board board
- List<King> kings
- Player winner
- Player loser
- Timer timer
+ {static} Game getInstance()
+ List<Player> getPlayers()
+ Player getCurrentPlayer()
+ void startGame(List<Player>,int,int,List<String>)
+ void endGame()
+ void switchPlayer()
+ void togglePause(boolean)
- void setPlayerColors(List<Player>)
- void updateGameStatus(GameStatus)
+ List<King> getKings()
+ GameStatus getGameStatus()
+ void update()
+ void movePiece(Piece,Square)
+ void setCheckmate()
+ Player getWinner()
+ Player getLoser()
+ Boolean isColorsTurn(Piece.ChessPieceColor)
+ Board getBoard()
+ void addKing(King)
+ Boolean isCheckMate(King)
+ List<Position> getNonCheckedMoves(Piece,List<Position>)
+ Boolean isKingInCheckOnMove(Piece,Position)
- void startTimer(int,int)
- void setPlayerTimes(List<Player>)
+ Boolean isKingInCheck(Piece)
+ Boolean attacksKing(List<Position>,Piece)
+ ArrayList<Move> getMoves()
}
abstract class com.mygdx.game.model.Piece {
- ChessPieceColor color
- Square square
- Image image
- List<Position> validMoves
- Board board
- IMoveStrategy moveStrategy
+ Board getBoard()
+ String toString()
+ {abstract}String getName()
+ ChessPieceColor getColor()
+ Position getPosition()
+ void setSquare(Square)
+ Square getSquare()
+ List<Position> getValidMoves()
+ Image getImage()
+ List<Position> getRepeatingMoves(int[][])
+ List<Position> getNonReapetingMoves(int[][])
# boolean isTargetSameColor(Position)
}
enum com.mygdx.game.model.ChessPieceColor {
+ WHITE
+ BLACK
}
class com.mygdx.game.model.moves.ThiefMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.moves.QueenMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.pieces.Pawn {
+ String getName()
}
class com.mygdx.game.model.board.Square {
- int x
- int y
- Piece piece
- boolean isOccupied
- Boolean isHighlighted
+ boolean isOccupied()
+ boolean isOccupiedByPiece()
+ void setPiece(Piece)
+ void removePiece()
+ void setOccupied(boolean)
+ Piece getPiece()
+ int getX()
+ int getY()
+ Position getPosition()
+ void setIsHighlighted(Boolean)
+ Boolean getIsHighlighted()
- String getPieceNameIfNotNull()
+ String toString()
+ Boolean equals(Square)
}
class com.mygdx.game.model.moves.KingMoveStrategy {
+ List<Position> calculateValidMoves(Piece)
}
class com.mygdx.game.model.board.Board {
- int width
- int height
- Square[][] squares
+ void setUpLoadouts(Loadout,Loadout)
+ int getWidth()
+ int getHeight()
+ Square getSquare(int,int)
+ Square[][] getSquares()
+ Boolean movePiece(Position,Position)
+ String toString()
}
class com.mygdx.game.model.pieces.Queen {
+ String getName()
}
class com.mygdx.game.model.pieces.Phoenix {
+ String getName()
}
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.KnightMoveStrategy
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.RookMoveStrategy
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.PawnMoveStrategy
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.PhoenixMoveStrategy
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Thief
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.King
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.SnakeMoveStrategy
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.BishopMoveStrategy
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Rook
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Snake
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Bishop
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Knight
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.ThiefMoveStrategy
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.QueenMoveStrategy
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Pawn
com.mygdx.game.model.moves.IMoveStrategy <|.. com.mygdx.game.model.moves.KingMoveStrategy
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Queen
com.mygdx.game.model.Piece <|-- com.mygdx.game.model.pieces.Phoenix
@enduml
\ No newline at end of file
This diff is collapsed.
Click to expand it.
puml/generated/view.puml
+
8
−
0
View file @
92c37b08
...
@@ -260,4 +260,12 @@ com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.SettingsView
...
@@ -260,4 +260,12 @@ com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.SettingsView
com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.GameLobbyView
com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.GameLobbyView
com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.LeaderboardView
com.mygdx.game.view.ViewState <|-- com.mygdx.game.view.LeaderboardView
com.mygdx.game.view.gestureListeners.GestureListener <|.. com.mygdx.game.view.gestureListeners.InGameGestureListener
com.mygdx.game.view.gestureListeners.GestureListener <|.. com.mygdx.game.view.gestureListeners.InGameGestureListener
InGameView *-- BoundedCamera
ViewStateManager *-- ViewState
InGameView *-- InGameHUD
InGameView *-- InGameGestureListener
InGameHUD -- HUDPosition
@enduml
@enduml
\ No newline at end of file
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