Contents Table
1. Analysis ............................................................................................................................ 8
1.1 Problem Definition and Stakeholders .............................................................................. 8
1.2 Computational Methods .................................................................................................. 9
1.3 Research ...................................................................................................................... 12
1.3.1 Existing Solutions ....................................................................................................... 12
1.3.2 Information Gathering................................................................................................. 17
1.3.2.1 Justification ............................................................................................................. 17
1.3.2.2 Transcript ................................................................................................................ 21
1.3.3 Conclusions from Research ....................................................................................... 22
1.4 Solution ......................................................................................................................... 23
1.4.1 Essential Features ..................................................................................................... 23
1.4.2 Limitations .................................................................................................................. 24
1.4.3 Requirements ............................................................................................................. 25
1.5 Success Criteria ............................................................................................................ 27
2. Design............................................................................................................................. 29
2.1 Decomposition .............................................................................................................. 29
2.2 Design Objectives ......................................................................................................... 30
2.3 System Structure........................................................................................................... 33
2.3.1 Flow Diagram ............................................................................................................. 33
2.3.2 Visualizations ............................................................................................................. 34
2.4 Algorithms ..................................................................................................................... 39
2.5 Usability Features ......................................................................................................... 43
2.6 Key Variables and Data Structures ............................................................................... 44
2.6.1 Variables and Data Structures.................................................................................... 44
2.6.2 Class Diagrams .......................................................................................................... 45
2.6.3 Validation ................................................................................................................... 46
2.7 Iterative Development Test Data ................................................................................... 47
2.7.1 Iteration 1 – Creating the pygame screen ................................................................... 47
2.7.2a Iteration 2 – Changing the background and drawing text onto the screen................. 47
2.7.2b Iteration 2 – Testing keyboard input ......................................................................... 48
2.7.3 Iteration 3 – Drawing buttons onto the pygame screen ............................................... 48
2.7.4 Iteration 4 – Scaling image sizes ................................................................................ 49
2.7.5 Iteration 5 – Getting mouse clicks on buttons ............................................................. 49
2.7.6 Iteration 6 – Changing the game state........................................................................ 50
1
Canidate Number: 2073
,2.7.7 Iteration 7 – Adding background and title ................................................................... 50
2.7.8 Iteration 8 – Username input box ............................................................................... 51
2.7.9 Iteration 9 – Drawing the level buttons onto the pygame screen ................................. 52
2.7.10 Iteration 10 – Creating the screens for the levels...................................................... 52
2.7.11 Iteration 11 – Drawing the chess board .................................................................... 53
2.7.12 Iteration 12 – Adding the pieces. .............................................................................. 53
2.7.13 Iteration 13 – Moving the pieces ............................................................................... 54
2.7.14 Iteration 14 – Validating moves: Pawn moves .......................................................... 54
2.7.15 Iteration 15 – Validating moves - Rook moves ......................................................... 55
2.7.16 Iteration 16 – Validating moves – Knight moves ....................................................... 55
2.7.17 Iteration 17 – Validating moves – Bishop moves ...................................................... 56
2.7. Iteration 18 – Validating moves – Queen moves .......................................................... 56
2.7 Iteration 19 – Validating moves – King moves ............................................................... 57
2.7 Iteration 20 – Check, Checkmate and stalemate ........................................................... 57
2.7 Iteration 21 – Pawn promotion....................................................................................... 58
2.7 Iteration 22 – Castling ................................................................................................... 58
2.7 Iteration 23 – End game screen and AI ......................................................................... 59
2.7 Iteration 24 – Creating the leaderboard ......................................................................... 59
2.7 Iteration 25 – Level 2..................................................................................................... 60
2.8 Post Development Test Data......................................................................................... 61
3. Development ................................................................................................................... 70
3.1 Iteration 1 – Creating the pygame screen ...................................................................... 70
3.1.1 Evidence .................................................................................................................... 70
3.1.2 Prototype.................................................................................................................... 72
3.1.3 Testing ....................................................................................................................... 73
3.1.4 Review ....................................................................................................................... 73
3.2 Iteration 2a – Changing the background and drawing text onto the screen ................... 73
3.2.1 Evidence .................................................................................................................... 73
3.2.2 Prototype.................................................................................................................... 74
3.2.3 Testing ....................................................................................................................... 75
3.2.4 Review ....................................................................................................................... 75
3.2 Iteration 2b – Testing keyboard input ............................................................................ 76
3.2.1 Evidence .................................................................................................................... 76
3.2.2 Prototype.................................................................................................................... 76
3.2.3 Testing ....................................................................................................................... 77
2
Canidate Number: 2073
,3.2.4 Review ....................................................................................................................... 78
3.3 Iteration 3 – Drawing buttons onto the pygame screen.................................................. 78
3.3.1 Evidence .................................................................................................................... 78
3.3.2 Prototype.................................................................................................................... 79
3.3.3 Testing ....................................................................................................................... 80
3.3.4 Review ....................................................................................................................... 80
3.4 Iteration 4 – Scaling image sizes ................................................................................... 80
3.4.1 Evidence .................................................................................................................... 80
3.4.2 Prototype 1................................................................................................................. 81
3.4.2 Prototype 2................................................................................................................. 81
3.4.3 Testing ....................................................................................................................... 82
3.4.4 Review ....................................................................................................................... 82
3.5 Iteration 5 – Getting mouse clicks on buttons ................................................................ 83
3.5.1 Evidence 1 ................................................................................................................. 83
3.5.2 Prototype 1................................................................................................................. 83
3.5.1 Evidence 2 ................................................................................................................. 84
3.5.2 Prototype 2................................................................................................................. 84
3.5.1 Evidence 3 ................................................................................................................. 85
3.5.2 Prototype 3................................................................................................................. 86
3.5.2 Prototype 4................................................................................................................. 87
3.5.3 Testing ....................................................................................................................... 88
3.5.4 Review ....................................................................................................................... 89
3.6 Iteration 6 – Changing the game state........................................................................... 89
3.6.1 Evidence 1 ................................................................................................................. 89
3.6.2 Prototype 1................................................................................................................. 89
3.6.1 Evidence 2 ................................................................................................................. 90
3.6.2 Prototype 2................................................................................................................. 91
3.6.1 Evidence 3 ................................................................................................................. 93
3.6.2 Prototype 3................................................................................................................. 94
3.6.3 Testing ....................................................................................................................... 95
3.6.4 Review ....................................................................................................................... 96
3.7 Iteration 7 – Adding background and title ...................................................................... 96
3.7.1 Evidence .................................................................................................................... 96
3.7.2 Prototype.................................................................................................................... 99
3.7.3 Testing ..................................................................................................................... 100
3
Canidate Number: 2073
, 3.7.4 Review ..................................................................................................................... 101
3.8 Iteration 8 – Username input box ................................................................................ 101
3.8.1 Evidence 1 ............................................................................................................... 101
3.8.2 Prototype 1............................................................................................................... 103
3.8.1 Evidence 2 ............................................................................................................... 104
3.8.2 Prototype 2............................................................................................................... 105
3.8.1 Evidence 3 ............................................................................................................... 111
3.8.2 Prototype 3............................................................................................................... 113
3.8.1 Evidence 4 ............................................................................................................... 118
3.8.2 Prototype 4............................................................................................................... 120
3.8.1 Evidence 5 ............................................................................................................... 124
3.8.2 Prototype 5............................................................................................................... 125
3.8.3 Testing ..................................................................................................................... 128
3.8.4 Review ..................................................................................................................... 129
3.9 Iteration 9 – Drawing the level buttons onto the pygame screen.................................. 129
3.9.1 Evidence .................................................................................................................. 129
3.9.2 Prototype 1............................................................................................................... 133
3.9.2 Evidence 2 ............................................................................................................... 133
3.9.2 Prototype 2............................................................................................................... 135
3.9.3 Testing ..................................................................................................................... 136
3.9.4 Review ..................................................................................................................... 136
3.10 Iteration 10 – Creating the screens for the levels....................................................... 136
3.10.1 Evidence 1 ............................................................................................................. 136
3.10.2 Prototype 1............................................................................................................. 138
3.10.1 Evidence 2 ............................................................................................................. 139
3.10.2 Prototype................................................................................................................ 140
3.10.3 Testing ................................................................................................................... 143
3.10.4 Review ................................................................................................................... 144
3.11 Iteration 11 – Drawing the chess board ..................................................................... 144
3.11.1 Evidence ................................................................................................................ 144
3.11.2 Prototype................................................................................................................ 146
3.11.3 Testing ................................................................................................................... 146
3.11.4 Review ................................................................................................................... 147
3.12 Iteration 12 – Adding the pieces ................................................................................ 147
3.12.1 Evidence ................................................................................................................ 147
4
Canidate Number: 2073
1. Analysis ............................................................................................................................ 8
1.1 Problem Definition and Stakeholders .............................................................................. 8
1.2 Computational Methods .................................................................................................. 9
1.3 Research ...................................................................................................................... 12
1.3.1 Existing Solutions ....................................................................................................... 12
1.3.2 Information Gathering................................................................................................. 17
1.3.2.1 Justification ............................................................................................................. 17
1.3.2.2 Transcript ................................................................................................................ 21
1.3.3 Conclusions from Research ....................................................................................... 22
1.4 Solution ......................................................................................................................... 23
1.4.1 Essential Features ..................................................................................................... 23
1.4.2 Limitations .................................................................................................................. 24
1.4.3 Requirements ............................................................................................................. 25
1.5 Success Criteria ............................................................................................................ 27
2. Design............................................................................................................................. 29
2.1 Decomposition .............................................................................................................. 29
2.2 Design Objectives ......................................................................................................... 30
2.3 System Structure........................................................................................................... 33
2.3.1 Flow Diagram ............................................................................................................. 33
2.3.2 Visualizations ............................................................................................................. 34
2.4 Algorithms ..................................................................................................................... 39
2.5 Usability Features ......................................................................................................... 43
2.6 Key Variables and Data Structures ............................................................................... 44
2.6.1 Variables and Data Structures.................................................................................... 44
2.6.2 Class Diagrams .......................................................................................................... 45
2.6.3 Validation ................................................................................................................... 46
2.7 Iterative Development Test Data ................................................................................... 47
2.7.1 Iteration 1 – Creating the pygame screen ................................................................... 47
2.7.2a Iteration 2 – Changing the background and drawing text onto the screen................. 47
2.7.2b Iteration 2 – Testing keyboard input ......................................................................... 48
2.7.3 Iteration 3 – Drawing buttons onto the pygame screen ............................................... 48
2.7.4 Iteration 4 – Scaling image sizes ................................................................................ 49
2.7.5 Iteration 5 – Getting mouse clicks on buttons ............................................................. 49
2.7.6 Iteration 6 – Changing the game state........................................................................ 50
1
Canidate Number: 2073
,2.7.7 Iteration 7 – Adding background and title ................................................................... 50
2.7.8 Iteration 8 – Username input box ............................................................................... 51
2.7.9 Iteration 9 – Drawing the level buttons onto the pygame screen ................................. 52
2.7.10 Iteration 10 – Creating the screens for the levels...................................................... 52
2.7.11 Iteration 11 – Drawing the chess board .................................................................... 53
2.7.12 Iteration 12 – Adding the pieces. .............................................................................. 53
2.7.13 Iteration 13 – Moving the pieces ............................................................................... 54
2.7.14 Iteration 14 – Validating moves: Pawn moves .......................................................... 54
2.7.15 Iteration 15 – Validating moves - Rook moves ......................................................... 55
2.7.16 Iteration 16 – Validating moves – Knight moves ....................................................... 55
2.7.17 Iteration 17 – Validating moves – Bishop moves ...................................................... 56
2.7. Iteration 18 – Validating moves – Queen moves .......................................................... 56
2.7 Iteration 19 – Validating moves – King moves ............................................................... 57
2.7 Iteration 20 – Check, Checkmate and stalemate ........................................................... 57
2.7 Iteration 21 – Pawn promotion....................................................................................... 58
2.7 Iteration 22 – Castling ................................................................................................... 58
2.7 Iteration 23 – End game screen and AI ......................................................................... 59
2.7 Iteration 24 – Creating the leaderboard ......................................................................... 59
2.7 Iteration 25 – Level 2..................................................................................................... 60
2.8 Post Development Test Data......................................................................................... 61
3. Development ................................................................................................................... 70
3.1 Iteration 1 – Creating the pygame screen ...................................................................... 70
3.1.1 Evidence .................................................................................................................... 70
3.1.2 Prototype.................................................................................................................... 72
3.1.3 Testing ....................................................................................................................... 73
3.1.4 Review ....................................................................................................................... 73
3.2 Iteration 2a – Changing the background and drawing text onto the screen ................... 73
3.2.1 Evidence .................................................................................................................... 73
3.2.2 Prototype.................................................................................................................... 74
3.2.3 Testing ....................................................................................................................... 75
3.2.4 Review ....................................................................................................................... 75
3.2 Iteration 2b – Testing keyboard input ............................................................................ 76
3.2.1 Evidence .................................................................................................................... 76
3.2.2 Prototype.................................................................................................................... 76
3.2.3 Testing ....................................................................................................................... 77
2
Canidate Number: 2073
,3.2.4 Review ....................................................................................................................... 78
3.3 Iteration 3 – Drawing buttons onto the pygame screen.................................................. 78
3.3.1 Evidence .................................................................................................................... 78
3.3.2 Prototype.................................................................................................................... 79
3.3.3 Testing ....................................................................................................................... 80
3.3.4 Review ....................................................................................................................... 80
3.4 Iteration 4 – Scaling image sizes ................................................................................... 80
3.4.1 Evidence .................................................................................................................... 80
3.4.2 Prototype 1................................................................................................................. 81
3.4.2 Prototype 2................................................................................................................. 81
3.4.3 Testing ....................................................................................................................... 82
3.4.4 Review ....................................................................................................................... 82
3.5 Iteration 5 – Getting mouse clicks on buttons ................................................................ 83
3.5.1 Evidence 1 ................................................................................................................. 83
3.5.2 Prototype 1................................................................................................................. 83
3.5.1 Evidence 2 ................................................................................................................. 84
3.5.2 Prototype 2................................................................................................................. 84
3.5.1 Evidence 3 ................................................................................................................. 85
3.5.2 Prototype 3................................................................................................................. 86
3.5.2 Prototype 4................................................................................................................. 87
3.5.3 Testing ....................................................................................................................... 88
3.5.4 Review ....................................................................................................................... 89
3.6 Iteration 6 – Changing the game state........................................................................... 89
3.6.1 Evidence 1 ................................................................................................................. 89
3.6.2 Prototype 1................................................................................................................. 89
3.6.1 Evidence 2 ................................................................................................................. 90
3.6.2 Prototype 2................................................................................................................. 91
3.6.1 Evidence 3 ................................................................................................................. 93
3.6.2 Prototype 3................................................................................................................. 94
3.6.3 Testing ....................................................................................................................... 95
3.6.4 Review ....................................................................................................................... 96
3.7 Iteration 7 – Adding background and title ...................................................................... 96
3.7.1 Evidence .................................................................................................................... 96
3.7.2 Prototype.................................................................................................................... 99
3.7.3 Testing ..................................................................................................................... 100
3
Canidate Number: 2073
, 3.7.4 Review ..................................................................................................................... 101
3.8 Iteration 8 – Username input box ................................................................................ 101
3.8.1 Evidence 1 ............................................................................................................... 101
3.8.2 Prototype 1............................................................................................................... 103
3.8.1 Evidence 2 ............................................................................................................... 104
3.8.2 Prototype 2............................................................................................................... 105
3.8.1 Evidence 3 ............................................................................................................... 111
3.8.2 Prototype 3............................................................................................................... 113
3.8.1 Evidence 4 ............................................................................................................... 118
3.8.2 Prototype 4............................................................................................................... 120
3.8.1 Evidence 5 ............................................................................................................... 124
3.8.2 Prototype 5............................................................................................................... 125
3.8.3 Testing ..................................................................................................................... 128
3.8.4 Review ..................................................................................................................... 129
3.9 Iteration 9 – Drawing the level buttons onto the pygame screen.................................. 129
3.9.1 Evidence .................................................................................................................. 129
3.9.2 Prototype 1............................................................................................................... 133
3.9.2 Evidence 2 ............................................................................................................... 133
3.9.2 Prototype 2............................................................................................................... 135
3.9.3 Testing ..................................................................................................................... 136
3.9.4 Review ..................................................................................................................... 136
3.10 Iteration 10 – Creating the screens for the levels....................................................... 136
3.10.1 Evidence 1 ............................................................................................................. 136
3.10.2 Prototype 1............................................................................................................. 138
3.10.1 Evidence 2 ............................................................................................................. 139
3.10.2 Prototype................................................................................................................ 140
3.10.3 Testing ................................................................................................................... 143
3.10.4 Review ................................................................................................................... 144
3.11 Iteration 11 – Drawing the chess board ..................................................................... 144
3.11.1 Evidence ................................................................................................................ 144
3.11.2 Prototype................................................................................................................ 146
3.11.3 Testing ................................................................................................................... 146
3.11.4 Review ................................................................................................................... 147
3.12 Iteration 12 – Adding the pieces ................................................................................ 147
3.12.1 Evidence ................................................................................................................ 147
4
Canidate Number: 2073