0% found this document useful (0 votes)
8 views2 pages

Class Diagram

Uploaded by

chuhoi009.dt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Class Diagram

Uploaded by

chuhoi009.dt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer

Player -difficulty: Difficulty


Attack -playerId: String -stratergy: Stratergy Strategy
+board:Board +Computer()
<<enumeration>> attack: String <<enumeration>>
-setDifficulty()
+Hited -score:int -Target
-getDifficulty()
+Miss -Hunt
-setPlayerId() -setStrategy()
-Random
+getBoard() -getStrategy()
+setBoard() +placeShips()
+attack() -makeMove()
GameStatus
<<enumeration>>
Difficulty -InProgress
ShipDirection
<<enumeration>> -Finished
<<enumeration>> +PlayerTurn
-Hard
-Horizental +Paused
-Medium
-Vertical
-Easy

Game
Ship +gameStatus: GameStatus
Cell Board +gameChoice: String
shiptype: int
-behited: int -cellStatus: CellStatus +cells: Cell [] [] +boardChoice: String BoardChoice
shipStatus: String -row: int +getCellStatus() +board: Board
<<enumeration>>
shipDirection: String -col: char +setCellStatus() +player1: Player
+10x10, 5 ship
+getType() +getRow() +placeShip() +player2: Player
+15x15,6 ship
+setType() +getCol() +removeShip() +Game()
+getDirection() +setStatus() -startGame()
+setDirection() +getStatus() -endGame()
+isSunk() +getStatus()
+setStatus()

GameChoice
ShipStatus CellStatus <<enumeration>>
-PVP
<<enumeration>> <<enumeration>>
-PVE
+Sunk -Occupied
-Hited -Empty
-Safe -Hited
Circle
- radius : float
- center : unsigned int
+area(in radius : float) : double
+circumstance()
+setCenter()
Frame +setRadius()

The main window of the application

Event Game
+open() Shape
+close()
+move() +draw()
+erase()
+display()
+handleEvent() +move()
+resize()

c ConsoleWindow DialogBox Rectangle Polygon


+setPoint()
+clearScreen()
+getVerticalSize()
+getHorizontalSize()
DataController Point

You might also like