SE306:Group 3:Subgroup 1
Subgroup 1
- Shruthi
- Geoffrey
- Danver
Our test-bed for the Elmo game engine is hosted at
https://subversion.sfac.auckland.ac.nz/svn/prj_G31_SOFTENG_306_C_S2_2008/
Game building checklist
- Specifying images
- Connecting to Database
- Writing game
- Getting move
- Click
- text
- Updating Game state
- Communicating with client succintly
- Client does not exhibit high levels of modularity, in particular, Game seems to need to be migrated to the client to work.
- Thin clients are a sham.
... to be discussed
Non functional issues identified
- Too many classes have the same name: elmo.Graph and ClientElmo.graph
- Two servers cannot exist together
- Clients require open DataBase connections
- Cannot make Reversi easily, as reversi does not involve moving pieces, but adding them.
- Fat client:- Why does Chess have to be migrated to Client class? Without this, it doesn't work
- Very inelegant architecture in that the game calls back to the engine instead of using template pattern.
- Cntrl C Cntrl V style of programming:
/** * Moves the chit and ends the clients turn * * @param chitIndex - the index of the chit to be moved * @param nodeDest - the index of the node the chit is to be moved to */ public void MoveChit(int chitIndex, int nodeDest) { ChangeTurn(); super.MoveChit(chitIndex, nodeDest); } /** * Moves the chit and ends the clients turn * * @param chit - the Chit object of the chit to be moved * @param nodeDest - the index of the node the chit is to be moved to */ public void MoveChit(Chit chit, int nodeDest) { ChangeTurn(); super.MoveChit(chit, nodeDest); } /** * Moves the chit and ends the clients turn * * @param chit - the Chit object of the chit to be moved * @param nodeDest - the Node object of the node the chit is to be moved to */ public void MoveChit(Chit chit, Node nodeDest) { ChangeTurn(); super.MoveChit(chit, nodeDest); } /** * Moves the chit and ends the clients turn * * @param chit - the index of the chit to be moved * @param nodeDest - the Node object of the node the chit is to be moved to */ public void MoveChit(int chitIndex, Node nodeDest) { ChangeTurn(); super.MoveChit(chitIndex, nodeDest); }
- Movement code for pieces is separated from the rest of the game, yet pieces don't move in isolation. This is why they don't have "check" working in chess. To test if a king is in check requires knowledge of every other piece in the board, which is impossible in their system.
Acceptance Testing
Our testing plan was as follows:
- Mix of white-box and black box testing
- Two testers involved at all times
- Testing the requirements
- implementing game and verifying good behaviour
- code inspection
Next line
- fulfils requirements
- user interface works?
- performance is within constraints?
- loading requirements
- compatible modules
- error handling?
- database rollback and committing?
Functional AND non-functional
- C-B A. Mention budgeting time to bug fixes. All the bugs we didn't fix are because they would take too long.
Work hours
Name | Date | Start time | End time | Notes |
---|---|---|---|---|
All | 23-9-08 | 2:00 pm | 3:00 pm | Reading Documentation and sorting out logistics issues |
All | 25-9-08 | 1:00 pm | 2:30 pm | Set up subversion, partitioned problem, initial analysis |
Geoffrey | 28-9-08 | 12:30 pm | 5:30 pm | Tried running the server/client on uni desktops, testing game/client, started writting testcase for elmo.Engine |
Danver | 28-9-08 | 1:30 pm | 4:00 pm | Running server, just messing around |
Shruthi | 29-9-08 | 11:00 am | 12:00 pm | Just tried getting elmo set up for running, got a few errors so fixed them |
All | 29-9-08 | 3:00 pm | 5:00 pm | Succeeded in getting game running, updated subversion to hold working testbed copy, identified a number of bugs. Needed to move Chess/images into the client. (sounds like bad design) |
All | 30-9-08 | 2:00 pm | 3:00 pm | Tried to do reversi, but engine doesn't support it |
Geoffrey & Shruthi | 02-10-08 | 10:00 am | 11:00 am | Started developing checkers game |
Danver and Geoffry | 3-10-08 | 3:00 pm | 5:00 pm | Running Checkers, finding bugs |
Danver | 3-10-08 | 5:00 pm | 7:00 pm | Running Checkers, finding bugs |
All | 4-10-08 | 11:00 am | 5:00 pm | Running Checkers, finding bugs |
Danver and Geoffrey | 4-10-08 | 5:00 pm | 7:00 pm | Running Checkers, finding bugs |
Danver and Geoffrey | 5-10-08 | 12:00 am | ?? | Writing report |
Notes
BugId | Allocated To | Name | Description | Module | Discovered Time | Status | Fixed Time | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Geoffrey | The Chess and Chess.image sub packages had to be moved from the Server package to the Client Server. | This showed another fat client implementation which is not ideal. | Structure | 15:00 30-9-08 | workaround | |||||||
1 | Danver | SocketTimeOutException | Socket times out (cause unknown) at clientElmo.ClientNetReceive.run(ClientNetReceive.java:51) | Network Interface | 13:57 25-9-08 | Unfixed | |||||||
2 | Geoffrey | Infinite sleep | An exception is caught for "File games.txt" not existing, but then you log in and it sleeps. Client Thread never disposed from server | Server | 14:04 25-9-08 | fixed | |||||||
3 | Shruthi | Ugly exception thrown if no connection to server exists | Network Interface/Client | 14:09 25-9-08 | Unfixed | ||||||||
4 | Danver | IndexOutOfBounds from server message at clientElmo.ClientEngine.decodeMessage(ClientEngine.java:186) | Client/ Network Interface | 14:12 25-9-08 | Unfixed | ||||||||
5 | Geoffrey | at clientElmo.ImageRenderComponent.paintComponent(ImageRenderComponent.java:80) | Server or Rendering | 14:20 25-9-08 | Unfixed | ||||||||
6 | Shruthi | One game goes away when it's the other player's turn | Rendering | 14:21 25-9-08 | Unfixed | ||||||||
7 | Geoffrey | Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 at java.util.Vector.elementAt(Unknown Source) at elmo.Node.getChit(Node.java:235) at elmo.Engine.start(Engine.java:686) at elmo.GameServer.main(GameServer.java:30) |
Server | 14:21 25-9-08 | Unfixed | ||||||||
8 | Shruthi | Client updates with YourTurn but no display | Server | 14:25 25-9-08 | Unfixed | ||||||||
8 | Shruthi | Game is are made! Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException |
Client | 15:45 29-9-08 | Unfixed | ||||||||
9 | Danver | Buffered reader fills up? Something breaks at d.readline (clientNetReceive.java:51) | Interface | 15:45 29-9-08 | Unfixed | ||||||||
10 | Danver | Making sure the client doesn't display first window without connection to server. | Interface | 15:45 29-9-08 | Unfixed | ||||||||
11 | Danver | Changed the network interface to read messages in a quicker, lighter more robust way. More specifically, "KILL" messages were parsed in a bug-prone way. | Interface | 15:45 29-9-08 | Fixed | ||||||||
12 | Danver | Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 at java.util.Vector.elementAt(Unknown Source) at elmo.Node.getChit(Node.java:235) at elmo.Engine.start(Engine.java:639) at elmo.GameServer.main(GameServer.java:30) |
Interface | 15:45 29-9-08 | Unfixed | ||||||||
13 | Danver |
Chess tripled if second player joins |
Interface | 15:45 29-9-08 | Unfixed | ||||||||
14 | Danver | If new Server starts up, old server crashes horribly. All state from old server is "preservered" which is a horrible lie because they're abusing TCP connections. Server needs to disconnect all clients when it dies. | Interface | 15:45 29-9-08 | Unfixed | ||||||||
15 | Danver | Not enough abstract methods: Join client is unimplemented, setTurnOwner is unimplemented in an extensible way. | Interface | Thursday, 2nd October 2008 12:58:35 | Unfixed | ||||||||
16 | Geoffrey | java.net.SocketTimeoutException: Read timed out | An exception is caught after 9 - 10 seconds if you open the client and do not log in | Server | 15:04 03-10-08 | fixed | 03-10-08 | ||||||
17 | Danver | Implementing a game is hard because constructor method displays very little knowledge of code reuse
public Checkers(int gameID, boolean recreate) { super(gameID); //System.out.println("Initialising Chess Map"); whiteSide = new ClientView(this); blackSide = new ClientView(this); graph = new CheckersMap(this); this.name = "checkers.Checkers"; this.MaxPlayers = 2; this.resX = 450; this.resY = 500; } Notice the value of recreate is never read in this method. According to the documentation, having no boolean means false, and having any boolean, even a false one, means true. The code between the two versions of the constructor are essentially similar, and a hot spot for programmer error. This error is because the Game class that is provided does not enforce the constructors that must be implemented by the game itself and the engine: You can delete the constructor by accident and then run away. See bug 15 |
Interface | Friday, 3 October 2008 | Fixed | Friday, 3 October 2008 | |||||||
15 | Danver | If you log in as name%KILL the server behaviour is anomalous. This presents a security flaw in the system | Interface | Thursday, 2nd October 2008 12:58:35 | Friday, 3 October 2008 | Workarounded by stripping all percent signs from the input. Don't they know about Godel? | Friday, 3 October 2008 | ||||||
16 | Shruthi | Client has editable JTable/JText | Client | Saturday, 4th October 2008 12:08:30 | Unfixed | ||||||||
17 | Shruthi | If you stack the SCHI mouse clicks from the client, then the server will respond with a whole slew of VCMV values. Instead of using only the VCMV for only the latest SCHI, the client will use them all. e.g. if a King is in CheckMate, you can select a pawn half a board away, then quickly select your king. The stacking of VCMVs will add to the king the possibility of teleporting to whatever location the pawn could, breaking the game. | Client | Saturday, 4th October 2008 13:34:22 | Unfixed | ||||||||
18 | Shruthi |
|
Client | Saturday, 4th October 2008 13:34:22 | Unfixed |
Usability Evaluation
Heuristics
Study
- Likert Scale
- Acquiescence bias
Enter doesn't work when you login.