1 / 13

Comprehensive Game Design for Board Players: Class Definitions and Functions

This document outlines the class definitions and key functions for the board game "Sorry!" as implemented in Mordor Programming. It includes detailed descriptions of the `Board`, `Player`, `Pawn`, and `Card` classes, showcasing their attributes and methods. Key functionalities such as moving players, drawing cards, checking for winners, and handling slides and bumps are integrated into the structure. The relationships and activity diagrams illustrate the game setup, player movements, and interactions, providing a clear framework for understanding the game's mechanics.

avalon
Télécharger la présentation

Comprehensive Game Design for Board Players: Class Definitions and Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sorry! By: Mordor Programming

  2. Use case

  3. Class Definitions • Board-players : array[Player]-cards : Cards -board : CircularArrayList[BoardSquare]+slide() +isBump() : boolean+bump() +checkWinner() : int +drawCard() : int • BoardSquare -colorPanel : string  -pawnColor : string -startSlide : boolean -isSZEntrance: boolean +getColorPanel() : string  +getPawnColor() : string  +getStartSlide() : boolean +getIsSZEntrance() : boolean

  4. Class Definitions cont’d • Pawn -positionIndex : int -start : boolean -home : boolean -inSZ : boolean +getPositionIndex() : int +movePositionIndex(newPosition : int) : boolean +getSZ() : boolean +getHome() : boolean +changeStart(switch : boolean) : boolean +changeHome(switch : boolean) : boolean +changeSZ(switch : boolean) : boolean • Player -color : string -pawns : array[Pawn]-ai : boolean+choosePawnToMove(index : int) : boolean+movePawn(positionToMove : int) : boolean • Cards -deck : array[int] -top : int +shuffle() +discard() +drawTopCard() : int

  5. Class Relationship Diagram

  6. Activity Diagram 1

  7. Activity Diagram 2

  8. Sequence Diagram 1 (GameSetup)

  9. Sequence Diagram 2 (Move)

  10. Sequence Diagram 3 (Bump)

  11. Sequence Diagram 4 (Sliding)

More Related