Class Diagram
Class Diagram
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()
Event Game
+open() Shape
+close()
+move() +draw()
+erase()
+display()
+handleEvent() +move()
+resize()