程序代写代做代考 Java gui Simple Social Card Collection Battling Game

Simple Social Card Collection Battling Game
Page

Simple Social Card Collection Battling Game
Design Document

Table of Content
1. Introduction………………………………………………………………………………2
2. Design Considerations………………………………………………………………….2
2.1 Assumptions…………………………………………………………………………2
2.2 Design Principles……………………………………………………………………2
2.3 Development Methods……………………………………………………………..2
3. Architecture Representation…………………………………………………………….2
4. System Architecture……………………………………………………………………..3
5. Policies and Tactics……………………………………………………………………….3
6. Detailed System Design………………………………………………………………….4
6.1 Login………………………………………………………………………………….4
6.2 Panel…………………………………………………………………………………4
6.3 View My Cards – Embedded in Panel……………………………………………4
6.4 View My Friends – Embedded in Panel…………………………………………5
6.5 Quick Match Waiting – Embedded in Panel…………………………………….5
6.6 In Match…………………………………………………………………………….5
6.7 Chat Window……………………………………………………………………….5
7. Glossary…………………………………………………………………………………..6

1. Introduction
This document is specifying the particular design choices being made for the software: Simple Card Collection and Battling Game.
2. Design Considerations
2.1 Assumptions
This design assumes that user has a standard mouse and keyboard in a PC platform, with an operating system compatible running Java programs.
Relatively stable internet connection is also assumed.
2.2 Design Principles
The Design principle is kept simple, with minimal safety and privacy feature. GUI is kept as straightforward as possible and mostly limiting interactive items to buttons.
2.3 Development Methods
We used Build & Fix, to keep it simple.
3. Architectural Representation

4. System Architecture
The system is build using object-oriented design. A center object, Game, manages nearly all possible attributes of this software, and GUI objects calls on method of the center object to update itself. The center object has access to all GUI objects to update the display.
The center object operates the communication with server, which packs message according to a defined protocol, and unpacks message from the server and updates itself accordingly.
5. Policies and Tactics
This software uses standard JRE 1.8 and Eclipse SWT library for compile and running.
To make GUI not as ugly and code not as messy, SWT library is a better option than Javax -Swing.
Java provides straightforward object-oriented design support.
6. Detailed System Design
6.1 Login:
Label_Username

Textfield_Username

Label_Password

Textfield_Password

Button_Submit

Submit button calls a method in Game, packs the two fields into a packet and send to server, and be expecting a result indicating the authentication status.
With successful login, direct user to Panel.
With unsuccessful login, clears two textfields and ask the user to try again.
6.2 Panel:
Label_MyNickname

Button_ViewMyCards

Button_ViewMyFriends

Button_QuickMatch

Button_Logout

Logout redirects user back to login (quitting is implement in closing window)
The other 3 buttons redirects user to their screens, while a request for information update is sent to the server.
6.3 View My Cards – embedded in Panel:
Label_CardStatus1
Label_CardStatus2



Button_AddSelected

Card 1
Card 2


Label_CardStatusM
Label_CardStatusN



Button_RemoveSelected

Card M
Card N


Label_DeckStatus
Label_SelectedCard

Button_Back

Card Status label indicates how many cards of this kind are already in the deck.
Card M displays the card image and its description.
User can select cards by clicking on to them, and add and remove operations are only limited to the card selected. (Legal operations check)
Back brings user back to Panel.
6.4 View My Friends – embedded in Panel:
Label_FriendStatus1
Label_FriendStatus2



Button_StartChat

Friend 1
Friend 2



Button_RequestBattle

Label_FriendStatusM
Label_FriendStatusN



Label_SelectedFriend

Friend M
Friend N



Button_Back

Friend Status Label indicates whether they are online, and whether there are messages or battle requests pending.
Friend M displays their friend’s nickname.
Select a friend by clicking onto the nickname, and Start Chat and Request Battle functions are limited to selected friend.
Back brings user to Panel.
6.5 Quick Match Waiting – embedded in Panel:
Label_TimeWaited

Button_CancelQueueing

Each second queueing status is updated, also updating the time waited.
A successful matchmaking brings users directly to a match.
Cancel Queueing brings user back to Panel.
6.6 In Match:
Enemy_Slot1
Enemy_Slot2
Enemy_Slot3
Enemy_Slot4
TextArea_BattleLog

Enemy_Slot5
Enemy_Slot6
Enemy_Slot7
Enemy_Slot8
Button_StartChat

My_Slot1
My_Slot2
My_Slot3
My_Slot4
Button_EndTurn

My_Slot5
My_Slot6
My_Slot7
My_Slot8
Button_Surrender

My_Hand1
My_Hand2
My_Hand3
My_Hand4
My_Hand5

Match is separate from Panel, but there is a field prevent user from going to matchmaking or request battle to a friend when a match is active.
Cards are active on the field, and users can perform interactions with them as long as they are legal.
End turn tells the server it is user opponent turn to move.
Surrendering ends the game.
Closing the window also results in surrendering.
6.7 Chat Window:
TextArea_MessageLog

TextField_InputMessage

Button_Send

Button_RequestBattle

Chat window is also separated from panel, and multiple windows can be active at the same time.
All messages are stored in Game, Message Log is updated when Game receives an message or the user sends something out.
User enter message into the input textfield.
Send clears the input field, and sends the message to Game, where Game contacts with server.
Battle Requests can also be sent here.
7. Glossary
This design document is made by Lee Kelvin lxk201 and Qianxiang Ma qxm28.