Advanced Higher Computing Project Concentration Card Game Alan Fordyce SQA Number: 063789356 Baldragon Academy, Dundee 1|Page Alan Fordyce Contents Project Proposal Page 3 - 5 Project Specification Page 6 - 7 Alternative Solutions Page 8 – 9 Design Page 10-14 Pseudocode Page 15 - 19 Testing Page 20 - 34 User Guide Page 35- 40 Technical Guide Page 41 - 42 Evaluation Page 43 - 46 2|Page Alan Fordyce Project Proposal Background Card games are very familiar both on and off computer systems. For my Advanced Higher Project I decided to create a matching card game that would be fun and challenging to play. Playing this game with ordinary cards is very time consuming as the player/s have to constantly flip the cards to show and hide them. The player also needs a large area to lay out the cards. A computer version of this game is much easier as all the player/s have to do is focus on remembering where the cards are located and gaining matches. Playing similar games on a computer system usually involves the player having to visit a webpage and installing the necessary plugins to handle the game. This version will only require an operating system from Microsoft e.g. Windows XP or Windows 7. Support Programming Games with MS VB 6.0, by Catherine Muir Dwyer and Jeanine Meyer, 2001, Course Technology, Thomson Learning, USA, pages 43-60 http://www.vbforums.com/showthread.php?t=546633, Code to Implement a sleep function, User LaVolpe, Date accessed: 09/12/11 http://www.vbforums.com/showthread.php?t=138280, Code to implement form and controls resizing, User Achichincle, Date accessed 06/02/12. Code to get the Windows Username of the current player. I am unable to find the correct website for this code. Scholar, Standard Algorithms, Sorting Scholar, Data Structures, Implementation of a Record Microsoft DreamSpark, Microsoft Visual Studio, Date accessed 29/11/11, https://www.dreamspark.com/default.aspx Card Images were taken from Wikipedia, http://en.wikipedia.org/wiki/Playing_card#Styling The Icon Image was taken from Wikipedia, http://en.wikipedia.org/wiki/File:French_suits.svg Main Features of the Solution The program should have an attractive background and card design The user should be able to exit the game at any time The program should continue until all matches have been made The program should time the player and display it at the end The program should store 50 user names and times The program should be able to display the best 50 times in descending order The program should show all the card values at the start then flip them over to start the game 3|Page Alan Fordyce The program should allow the user to replay until they decide to quit The program should allow the user to search the best times for their name and display them The program should display the current time and matches while playing The program should allow the user to view the cards again for help The program should have a help feature such as a walkthrough or tutorial The program should provide feedback that is easy to understand The program should provide the user with audio feedback Hardware, Software and Resources Needed To complete this program I will require a computer that is capable of running and has the chosen Software Development application installed. Front and back images of a full deck of cards will be required for the program. The computer will also require a graphics application to make edits to the card images. The graphics application I will use is the pre-installed Windows ‘Paint’ application by ‘Microsoft’. The application will be used to resize and crop the card images. To edit the audio files the application ‘Audacity’ created by ‘The Audacity Team’ will be used. Stage Estimated Time Analysis 5 Hours Design 4 Hours Language Learning 1 Hour Implementation 20 Hours Testing 5 Hours Documentation 5 Hours Evaluation 5 Hours 4|Page Alan Fordyce Gant Chart 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Hours March February February February February February February February February February February January January January January January January January January December December December December December December December November November November November November November November November November October October October October October September September September September September Analysis 5 Hours Design 4 Hours Learning Language 1 Hour Implementation 20 Hours Testing 5 Hours Documentation Evaluation 5 Hours 5 Hours 5|Page Alan Fordyce Project Specification Scope and Objectives The scope of the project is to create a program which simulates the card game known as ‘Concentration’ (Memory). The objective of the project is to simplify the playing of Concentration by randomly shuffling cards and turning them over when chosen to speed up the game for the player. Activities To complete the project the program will have to be designed based on the specification. The necessary resources will have to be obtained and edited for use in the program. The user interface and the program code will have to be designed. The rules of the game will have to be identified and included in the program. Implementation of the program in my chosen programming language will be carried out. The project will be tested based on the specification. The Solution The finished program will need to be usable so it will have to handle the rules of the game and be able to respond to user inputs. The solution will have to output feedback to the user which is easy to understand. This includes rule breeches, animation and scoring. Boundaries To create this game within the time-scale of Advanced Higher the solution will need to be limited. The game should be able to do all the features outlined earlier and should not be expanded upon. One feature that I will not include is a difficulty setting, which is included in similar programs to make the game easier or harder. This will create a fun and challenging game within the level of Advanced Higher that will not take a large time-scale to complete. Issues of Feasibility Economic There are no costs involved with creating this project as all resources and support are available for free from various sources. Legal The images that will be used for the program will be taken from Wikipedia under their GFDL license. This license allows the images to be used and modified for commercial or non-commercial use. Microsoft Visual Studio 6 can be acquired from Microsoft Dreamspark’s Website. 6|Page Alan Fordyce Time The project has timescales in place to make sure that the finished program is completed before the hand in date. Technical The necessary technology is available to create this program. 7|Page Alan Fordyce Alternative Solutions Present Solution To currently play the game of Concentration you can either use real cards or visit a Website and play the game in your Browser. Drawbacks To play Concentration with real cards the player/s have to gather and shuffle the cards. They also constantly have to flip over the cards until all matches have been made. This can be timeconsuming and cards may get muddled up as the game progresses. Playing concentration on a Browser website requires that the correct plug-ins are installed to run the embedded application. Most internet applications are in flash which can be very unstable on some systems causing the player to lose their progress. An internet connection constantly must be required to play the game which may not be available for some players. Criteria used to compare methods 1. 2. 3. 4. Can an appropriate HCI be created using this tool? What type of language is it and is it suitable? Is the language available for me to use? Does the program have High Level Language constructs that are complex enough for an Advanced Higher Program? 5. Do I have any experience with the programming environment? Software Development Environments Available Flash Java Visual Basic Python Language Comparison 1. Creation of HCI Flash Java Visual Basic Python From my past experiences with flash applications (such as browser games) I have seen that HCIs can be made. A HCI appropriate to this program can be Also from past experience with Java applications (browser games etc.) I have seen that appropriate HCIs can be made for my program. Visual Basic allows objects to be dragged and dropped using a GUI. Each object can be linked to sections of code. This allows a HCI to be easily implemented and changed Python uses toolkits to allow a programmer to program a GUI to meet their needs based on the toolkit they choose 8|Page Alan Fordyce 2. Type of language 3. Is the language available? 4. Complex High Level Language Constructs 5. Personal experience made Flash is an ObjectOriented language. Flash is suitable to create this program Java is an ObjectOriented language which is suitable to create this program Visual Basic is a Procedural Language with elements of an Object based language. Visual Basic is suitable because it works based on user interaction which is needed for this program Visual Basic is installed with Visual Studio on most School computers. It is also available to download from Microsoft DreamSpark, which I have access to Python is primarily an Object-Oriented language with elements of procedural and other types. Python is suitable to create this program Other students in my class are using this language to create their Advanced Higher Project, from this I know that this language has the necessary High level Language constructs available I have no experience in this language. Learning this language may be faster than the others because of the amount of help available online. The language is open-source and works with several open-source compilers. Although none of these compilers can be installed on the School Computer System which limits the languages use to Home From my studies into this language I have found that this language has the necessary High Level language constructs available GNU Compilers are available to install and use but none of these compilers can be installed which limits me to home use From my past experience I believe this language has the necessary High Level Constructs available to satisfy an Advanced Higher Project Visual Basic has the necessary High Level Constructs needed. Code can be used to access files, create multi-dimensional arrays and implement searching and sorting I have no experience in this language. Learning this language to a level suitable for Advanced Higher will take a large amount of time. I have limited experience with this language but not enough to be able to use the language to create a program at a level suitable for Advanced Higher. I have used Visual Basic since Standard Grade so I have the necessary experience to complete the project with this language. The language and compiler are opensource but as with the previous languages the compliers cannot be installed on the School Computer System Conclusion Although each of the languages above can be used to create this program I only have experience in one of them. Visual basic is the best choice for programming because I have the most experience in this language and have code available from other programs which can be integrated into my program. Visual Basic is the most readily available language I can use because all school computers have Microsoft Visual Studio installed as well as my home computer which was obtained from Microsoft DreamSpark. 9|Page Alan Fordyce Design User Interface The following section will describe the User Interface of each screen on my program. The screens are; Main Menu, High Scores, How to Play, Rules and the Game Board. The User Interface of my program will be a Graphical User Interface with an attractive layout that is easy to use and can provide meaningful feedback to the player to allow them to enjoy the game to the fullest. Each screen will have a button that will take the player back to the main menu if needed. Main Menu The Main Menu Interface will contain a small intro to the game, an easy to understand layout and buttons that link to the other forms in the program. These buttons have links to; an instruction screen to show the player how to play the game; a screen that displays the rules of the game; a screen that allows the player to play the game; exiting the game; and a screen that displays the list of high scores. Game Title, Information about the game. SQA Details etc. Menu Buttons High Scores The High Scores interface will contain a locked text box in the middle of the form that will output all the High Scores in an easily understandable format. The background colour will be the default Visual Basic grey with black font for text. 10 | P a g e Alan Fordyce Menu Buttons High Scores Output How to Play The how to play interface will be split up into steps each separated by a black line. Each step will contain text and an image showing an example of the step. The lines will be thick enough to stand out as separators while both the text and lines will be coloured black. The background colour will be the default visual basic grey. 11 | P a g e Alan Fordyce Menu Buttons Images Separators Rules The Rules interface will contain a locked text box in the middle of the screen with a button to return to the main menu when needed. The locked text box font colour will be black with the form using the default Visual Basic grey background colour. The rules of the game are; Only two cards can be picked in one try. The picked cards must be of the same rank, colour does not matter, to gain a match. The game should only be played with one player. The player has to successfully match 26 cards to complete the game. The cards will be turned over and one added to the amount of tries if the match is unsuccessful. 12 | P a g e Alan Fordyce Menu Buttons Rules Output Game Board I have decided to create the Game Board Interface in Black, White and Green to simulate a real Card Board. The card images on the Game Board will be in Black and Red to help identify their suit. The Card Images have a number (or letter) to identify them and also have a suit image. The Game Board Interface will provide the player with a real-time update on their current score, which includes Time, Tries and Matches and this information will be easily identifiable along the bottom of the Board. This will provide meaningful feedback to the player. The game board includes options such as; Restart; Main Menu; Reveal Cards and Begin a New Game. The Game Board will also have links to the How to Play and Rules screen if the player needs them. 13 | P a g e Alan Fordyce Menu Buttons Playing Area. Space for 52 Cards Current Game Scores 14 | P a g e Alan Fordyce Pseudocode Main Menu 1. Get the current Windows Account name from the System. 1. Check if the Name has already been found (the program will have links to the main menu so there is no point in getting this again). 2. Ask the user if they would like to use this name or input their own. 1. If they decide to input their own show an input box and store the name. 3. Set the Global variable PlayerUserName to either the Windows Account name or a userdefined name. 2. Check if the High Scores file exists and if not then create it. 3. Show the Main Menu Interface to the user and wait for a click on one of the buttons. 1. If the User clicks the High Scores button then load the high scores form and close the main menu. 2. If the User clicks the How to Play button then load the How to Play form and close the main menu. 3. If the User clicks the Rules button then load the Rules form and close the main menu. 4. If the User clicks the Start button then load the Game Board form and close the main menu. 5. If the User clicks the Exit button then end the program. High Scores 1. Get the High Scores from the External Text File. 1. Set Count = to 1 for the number of Lines in the file, starting from line 1. 2. Open the External File for Input. 3. Begin Loop. 4. Get the Text on the Current Line represented by Count in the string HighScoresTemp. 5. Set Temp = “” 6. Get the first two characters from the HighScoresTemp string into the Temp string. 7. If the first character in Temp is a 0 then only the second number is needed. 8. Do steps 5-7 for the 4th and 5th characters in the HighScoresTemp string. 9. Do steps 5-7 for the 7th and 8th characters in the HighScoresTemp string. 10.Get the Player name which starts from the tenth character until the end of the line. 11.Convert the Strings to Integers and store them in the High_Scores record array. 12.Set Contents = to Contents + a formatted output of the High_Scores record array. 13.Add one to Count. 14.Loop Until the End of the File. 2. Set the Text Box to Contents. How to Play None Rules 1. 2. 3. 4. 5. Open the External Rules text file. Begin Loop. Get the current line text and store it in a string. Add the contents of the string into the textbox. Loop Until the End of the File. 15 | P a g e Alan Fordyce Game Board 1. Get the User Name from the Global variable and set a label to display it. 2. Show the Best Time for the current User Name (if any exists). 1. Set Count = to 1 for the number of Lines in the file, starting from line 1. 2. Open the External File for Input. 3. Begin Loop. 4. Get the Text on the Current Line represented by Count in the string HighScoresTemp. 5. Set Temp = “” 6. Get the first two characters from the HighScoresTemp string into the Temp string. 7. If the first character in Temp is a 0 then only the second number is needed. 8. Do steps 5-7 for the 4th and 5th characters in the HighScoresTemp string. 9. Do steps 5-7 for the 7th and 8th characters in the HighScoresTemp string. 10. Get the Player name which starts from the tenth character until the end of the line. 11. Convert the Strings to Integers and store them in the High_Scores record array. 12. Add one to Count. 13. Loop Until the End of the File. 14. Set the Users best Minutes and Seconds score to 99. 15. Counter for the Number of Items in the Array. 1. If Minutes(Counter) is less than the Users Best Minutes score and if the User Names are equal then set the Users Best Minutes Score to Minutes(Counter), the Users Best Seconds Score to Seconds (Counter) and the Users Best Tries to Tries(Counter). 2. Else if the Minutes(Counter) = The Users Best minutes and the User Names match then check if the Seconds(Counter) is less than the Best Seconds. If it is less then set the Users Best Seconds to Seconds(Counter) and Best Tries to Tries(Counter). 3. Next Counter 16. Set the Labels to display the Users Best Score. 3. Wait until the User Clicks Start or Clicks on any of the Buttons. 1. If the User Clicks start then Skip to Step 4. 2. Other Buttons that the user can click are below this section. 4. Load and play the Start sound. 5. Initialize the temporary card arrays, 4 of them in total. 6. Initialize the filled Boolean array and set all of them to false 7. Generate a random value for the first quarter of the cards and check that there is only 1 card of each. 1. Counter for all the 13 values in the Card integer array. 2. Generate a random number between 1 and 13. 3. Begin Loop 4. Check if the card value exists 5. If the value exists then generate a new random number, set valid to false. If the value does not exist then exit then set valid to true. 6. Loop until Valid = true 8. Repeat Step 7 for the second quarter of cards. 9. Repeat Step 7 for the third quarter of cards. 10.Repeat Step 7 for the fourth quarter of cards. 11.Add the first, second, third and fourth quarter values to the fulldeck array, which holds 52 values. 16 | P a g e Alan Fordyce 12.Using the fulldeck array values and an array of Imageboxes set the first quarter of the cards to Club images based on their number e.g. a value of 1 becomes a Club Ace image. 13.Using the fulldeck array values and an array of Imageboxes set the second quarter of the cards to Diamond images based on their number e.g. a value of 1 becomes a Diamond Ace image. 14.Using the fulldeck array values and an array of Imageboxes set the third quarter of the cards to Spade images based on their number e.g. a value of 1 becomes a Spade Ace image. 15.Using the fulldeck array values and an array of Imageboxes set the fourth quarter of the cards to Heart images based on their number e.g. a value of 1 becomes a Heart Ace image. 16.Counter for all the card and back Imageboxes. Set the Back Imageboxes visible property to false. Set the Card Imageboxes visible property to true. This allows the player to see all the cards at the start. 17.Disable and enable the required menu functions for the game. 18.Start the timer with an interval of one second. 1. Add one to the StartShowSeconds Integer variable. 2. Set the Label to display the value of 7 – StartShowSeconds. 3. If StartShowSeconds is greater or equal to 7 then hide the Cards. 1. Counter for all the Card and Back Imageboxes. Set the Card Imageboxes visible property to false. Set the Back Imageboxes visible property to true. 19.Start the timer with an interval of one second. This loops throughout the program. 1. Add one to the CurrentSeconds Integer variable every interval. 2. Set the Time label to display the CurrentMinutes and CurrentSeconds value every interval. 3. If CurrentSeconds is greater than 59 then add one to CurrentMinutes Integer variable and Play the Minute sound file. 20.Loop until all matches have been made. Wait until the user clicks a Back image box. 1. If the User’s first choice is 0 then set UserChoice(1) to the clicked card value by using the Array of Imageboxes and the FullDeck array. 1. Hide the clicked back Image box and show the clicked card Image box. 2. Set the HideBack variable to the back array Index value. 3. Add one to the CardsClicked integer variable. 2. If the User’s first choice is not 0 and the User’s second choice is 0 then set UserChoice(2) to the clicked card value. 1. Hide the clicked back Image box and show the clicked card Image box. 2. Add one to the CardsClicked integer variable. 3. Pause the program and show the two clicked cards 3. If the CardsClicked variable = 2 then. 1. Set CardsClicked to 0. 2. Add one to the number of Tries. 3. Check if UserChoice(1) = UserChoice(2). 1. If they equal then. 1. Add one to Matches. 2. Play the Match sound. 3. Disable the first card and back using the HideBack value. 4. Disable the second card and back by using the Index value. 5. Set the Matches label to the new Matches value. 2. If they don’t equal then. 1. Play the No Match sound. 2. Show the Back Imageboxes and hide the card Imageboxes. 17 | P a g e Alan Fordyce 21.When all the Matches have been made. 1. Stop the Timer. 2. Play the Win Sound. 3. Hide all the Back Imageboxes and set the Card Imageboxes to the Win Image. 4. Display the Users score. 22.Save the Users Score in the High Score file. 1. Check how many entries are in the High Score file. 1. Open the file for input. 2. Loop until end of file. 3. Get the text on each line. 4. Add one to the number of lines. 5. End loop and close the file. 2. Check the number of lines. 1. If the Number of lines is less than 50. 1. Open the High Scores file for append. 2. Check if the Minutes have only one digit and if so add a 0 before it. 3. Check if the Seconds have only one digit and if so add a 0 before it. 4. Check if the Tries have only one digit and if so add a 0 before it. 5. Print the User’s Minutes, Seconds, Tries and Name to the file. 6. Close the file 2. If the number of lines is equal or greater than 50. 1. Open the High Scores file for output. 2. Counter for the High Scores 1 to 49. 3. Check if the Minutes have only one digit and if so add a 0 before it. 4. Check if the Seconds have only one digit and if so add a 0 before it. 5. Check if the Tries have only one digit and if so add a 0 before it. 6. Print the Minutes, Seconds, Tries and Name to the file. 7. End Counter. 8. Check if the New Minutes have only one digit and if so add a 0 before it. 9. Check if the New Seconds have only one digit and if so add a 0 before it. 10.Check if the New Tries have only one digit and if so add a 0 before it. 11.Print the User’s Minutes, Seconds, Tries and Name to the file. 12.Close the file. 23.Sort the High Score File. 1. Counter for all the 50 High Scores. 2. If the Player Name is blank then use a dummy Minutes, Seconds and Tries value of 99. 3. End Counter. 4. For Outer = 1 to 50. 5. For Inner = 1 to 50. 6. If the Minutes(Outer) are greater or equal to the Minutes(Inner). 1. If the Seconds(Outer) are greater than the Seconds(Inner). 1. Set Minutes Temp to Minutes(Outer). 2. Set Minutes(Outer) to Minutes(Inner). 3. Set Minutes(Inner) to Minutes Temp 4. Set Seconds Temp to Seconds(Outer). 5. Set Seconds(Outer) to Seconds(Inner). 18 | P a g e Alan Fordyce 7. 8. 9. 10. 11. 12. 13. 14. 15. 6. Set Seconds(Inner) to Seconds Temp 7. Set Tries Temp to Tries(Outer). 8. Set Tries(Outer) to Tries(Inner). 9. Set Tries(Inner) to Tries Temp. 10. Set Player Name Temp to Player Name (Outer). 11. Set Player Name (Outer) to Player Name (Inner). 12. Set Player Name (Inner) to Player Name Temp. 2. If Minutes(Outer) are less than Minutes(Inner). 1. Set Minutes Temp to Minutes(Inner). 2. Set Minutes(Inner) to Minutes(Outer). 3. Set Minutes(Outer) to Minutes Temp. 4. Set Seconds Temp to Seconds(Inner). 5. Set Seconds(Inner) to Seconds(Outer). 6. Set Seconds(Outer) to Seconds Temp. 7. Set Tries Temp to Tries(Inner). 8. Set Tries(Inner) to Tries(Outer). 9. Set Tries(Outer) to Tries Temp. 10. Set Player Name Temp to Player Name (Inner). 11. Set Player Name (Inner) to Player Name (Outer). 12. Set Player Name (Outer) to Player Name Temp. Next Inner, Next Outer Open the High Scores file for output. Counter for the High Scores 1 to 50. If the Player Name is blank then add one to counter. Check if the Minutes have only one digit and if so add a 0 before it. Check if the Seconds have only one digit and if so add a 0 before it. Check if the Tries have only one digit and if so add a 0 before it. Print the Minutes, Seconds, Tries and Name to the file. End Counter. Pseudocode for User Interaction Code If the User decides to Exit the Program or Clicks the Main Menu button then ask them if they are sure. If the User clicks the Rules button then show the Rules window. The game will continue running in the background. The User can exit the Rules window by clicking the Red Cross at the top right and return to their game. If the User clicks the How to Play button then show the How to Play window. The game will continue running in the background. The User can exit the How to Play window by clicking the Red Cross at the top right and return to their game. 19 | P a g e Alan Fordyce Testing Create Test Data To fully test my program test data has to be created that can fully push the program to its boundaries or even further by causing a crash or error during execution. This will ensure that all errors and bugs are discovered before the program leaves the programmer (Me) which can then be corrected. Individual procedures will be tested to make sure they take the correct inputs and give the correct outputs. The whole program will be played several times to make sure it works from start to end without any errors or bugs and to ensure it gives the correct outputs. The procedures will be listed in order from the start of the program to the exit of the program. Main Menu The Main Menu has one variable it needs to get from the User and needs to respond to a user clicking on Menu buttons. No. 1 2 2.5 3 Activity Get the Player Name into strUserName. Get the Player Name into strUserName. Get the Player Name into strUserName via an Input box. Click the “Start the game” button. Input “Use the Windows Account Name”, Yes. “Use the Windows Account Name”, No. Type “Alan” into the Input box. Type “12345qwerty!”£$%” into the Input box. Click Button: “Start the game”. 4 Click the “How to play” button. Click Button: “How to play”. 5 Click the “Game Rules” button. Click Button: “Game Rules”. 6 Click the “View High Scores” button. Click the “Exit the game” button. Click Button: “View High Scores”. 7 Click button: “Exit the game”. Expected Result The program will set the strUserName variable to my school login account name. The program will set the strUserName variable to “Alan”. Reason for Choosing To check that the program can get the username of the current user. To check that the program can get a custom name from the user. The program will set the strUserName variable to “12345qwerty!”£$%”. To check that the program accepts special characters or numbers. The Main Menu will disappear and the Game Board will show. The Main Menu will disappear and the How to play window will show. The Main Menu will disappear and the Game Rules window will show. The Main Menu will disappear and the High Scores window will show. The program will close. To check that the user can get to the game board to play the game. To check that the user can get to the How to Play instructions. To check that the user can get to the Game Rules. To check that the user can get to the High Scores. To check that the user can exit the program. How to Play The How to Play Window has no Variables and only needs to respond to the User clicking the “Return to Main Menu” Button. No. 1 Activity Click the “Return to Main Menu” button. Input Click button: “Return to Main Menu”. Expected Result The How to Play Window will disappear and the Main Menu will show. Reason for Choosing To check that the user can get to the Main Menu from the How to Play Window. 20 | P a g e Alan Fordyce Game Rules The Game Rules Window needs to open an external text file and load the contents into a Textbox. The Rules Window has 1 variable, a text box and a button to return to the Main Menu No. 1 2 Activity Click the “Return to Main Menu” button. Get the Rules from the External File into the Textbox. Input Click button: “Return to Main Menu”. Expected Result The Rules Window will disappear and the Main Menu will show. The program will get all text from the file and display it in the Textbox. Reason for Choosing To check that the user can get to the Main Menu from the Rules Window. To check that the user can view the rules. Expected Result The High Scores Window will disappear and the Main Menu will show. The High Scores Window will appear with the Textbox filled with the High Scores from the High Scores file. Reason for Choosing To check that the user can get to the Main Menu from the High Scores Window. To check that the program can successfully get the correct High Scores and display them. Input Click button: “Return to Main Menu”. Click Message box button: “Yes”. Click button: “Return to Main Menu”. Click Message box button: “No”. Click button: “How to Play”. Expected Result The Game Board Window will disappear and the Main Menu will show. Reason for Choosing To check that the user can get to the Main Menu from the Game Board Window. The Game Board Window will not disappear. The Rules window will appear and the Game Board will stay visible. The program will no longer play any sound during the game. The program play sounds again during the game. To check that the user can cancel exiting the Game Board if they accidentally press the wrong button etc. To check that the user can view the How to Play information while the Game is running. To check that the user can view the Rules while the Game is running. To check that the player can Mute the game while playing. To check that the player can unmute the game while playing. To check that the user can exit the program. Text from an External File into RulesText variable. High Scores No. 1 2 Activity Click the “Return to Main Menu” button. Load the Window to get the High Scores. Input Click button: “Return to Main Menu”. Click the High Scores button on the Main Menu. Game Board No. 1 Activity Click the “Return to Main Menu” button. 2 Click the “Return to Main Menu” button. 3 Click the “How to Play” button. 4 Click the “Rules” button. Click button: “Rules”. 5 Click the “Mute Audio” button. Click button: “Mute Audio”. 6 Click the “Unmute Audio” button. Click button: “Unmute Audio”. 7 Click the “Exit Game” button. 8 Click the “Exit Game” button. Click button: “Exit Game”. Click Message box button: “Yes”. Click button: “Exit Game”. Click Message box button: “No”. The How to Play window will appear and the Game Board will stay visible. The program will close. The program will not close. To check that the user can cancel exiting the Game if they accidentally press the wrong button etc. 21 | P a g e Alan Fordyce 9 Form Load. Get High Scores and the Best Score for the Player. The program will get the High Scores from the external file into the High_Scores Record. The program will get the Best Score for the Current User. 10 Sort the High Scores file 11 Click the “Begin the Current Game” button. Generate the Random Numbers for the Cards. Click button: “Begin the Current Game”. Random numbers into Card1, Card2, Card3 and Card4 integer variables. 12 Fill the Imageboxes with the correct card images based on the random numbers. Show all the cards to the player. FullDeck integer variable. The program will use a simple sort to sort the High Scores file based on the best to worst time. The High Scores file will be sorted. The random numbers for all the cards will be generated and placed into the FullDeck variable. There will be an even amount of each card e.g. two 2 of Spades or four King of Clubs. The Imageboxes will be filled with the random integer numbers from the FullDeck integer variable. Hide the cards after seven seconds. Click one card. StartShowSeconds integer variable is greater or equal to 7. Click one back image box. UserChoice(1) integer variable is empty. 16 Click a second card. 17 Check for a match. 17.5 UserChoice(1) and UserChoice(2) match. Click on a second back Image box. UserChoice(1) integer variable is not empty. UserChoice(2) integer variable is empty. UserChoice(1) and UserChoice(2) integer variables are both not empty. UserChoice(1) and UserChoice(2) match. 17.5 UserChoice(1) and UserChoice(2) do 13 14 15 The Card Images will be shown to the player. UserChoice(1) and UserChoice(2) do not The Card Images will be hidden and the Back Images will be shown. The back Image box will be hidden and the Card Image box will be shown. UserChoice(1) integer variable will be set to the Card Number based on the FullDeck integer variable. The back Image box will be hidden and the Card Image box will be shown. UserChoice(2) integer variable will be set to the Card Number based on the FullDeck integer variable. To check that the program can load the High Scores and to check that the program can get the Best Score for the Current Player so they have a target to beat. To check the program can sort the High Scores file so no problems arise later from an unsorted list. To check that the program can generate an even number of random values to fill the cards with. To check that the program can display the cards in their correct position based on the FullDeck variable. To give the player a hint of where the cards are located as the game starts. To check that the cards can be hidden after the player has been given a hint. To check that the player can select a card to match. To check that the player can select two cards. The program will check if UserChoice(1) and UserChoice(2) equal. To check that the program can check for a match. The program will play the match sound (unless the mute button has been pressed) and add one to Matches. The matched cards will be hidden. One will be added to tries. The program will play the No Match sound. One will be To check that when a match is found the program can respond. To check that when a match is not found the program can 22 | P a g e Alan Fordyce not match. match. 18 Click more than two cards. Click three or more cards. 19 Time goes above 99 Minutes. 20 Tries goes above 99. 21 All 26 Matches have been made. Matches = 26. 21.5 Click “Yes” to viewing the High Scores. Click “No” to viewing the High Scores. Click Input box button: “Yes”. 21.5 Click Input box button: “No”. added to tries. The cards Imageboxes will be hidden and the back Imageboxes shown. The program will display a message telling the user to play the game properly and will not register and matches. The program will display a message saying the player has lost and allowing them to restart. The program will display a message saying the player has lost and allowing them to restart. The program will play the win sound. All the card Images will be changed to Win Images and shown. The program will display the Users score. The program will ask the User if they want to view the High Scores. The Game Board will disappear and the High Scores window will display. The Game Board will disappear and the Main Menu will show. respond. To check that a player cannot break the rules by clicking a large amount of cards. To check that the play time cannot go higher than 99 minutes which will break the High Scores. To check that the Tries cannot go higher than 99 as this will break the High Scores. To check that the program can respond to the Player matching all the cards. To check that the Player can view the High Scores after a game. To check that the Player can leave a finished game and return to the Main Menu. 23 | P a g e Alan Fordyce Initial Testing Initial testing was carried out while implementing the program in Visual Basic. Visual Basic allows the programmer to run the programmer while it is still being implemented. This is useful as it allows the programmer to test the code as new code is added. The following problems were discovered: Most bugs encountered were due to typing errors such as Variables not being spelt correctly. The Code for generating the Random Numbers used for the cards did not function correctly. The code was not creating a double for each card which made the game unwinnable. The code to show all the cards again caused the sleep timer to break; this meant that the player could not see the second card image when they clicked on it. The player could freeze the program if they tried to select three or more cards while playing the game. The code to get the best score for the current player could not find any values lower than one. The High Score code could not recognise values of 0. The code to play sound would not function. Using an executable and loading the game board would show an error message and crash if Visual Basic was not installed on the system. Once identified the problems above were all fixed except from two. The ‘Show all cards again’ function was removed and the Crash if Visual Basic was not installed was ignored. This was ignored because a final version of this program could be packaged with the required Component which would make it work without Visual Basic. Testing Using Test Data The following steps were followed in order unless the same procedure was needed by the next step or the Window was closed by clicking a button e.g. clicking the “Game Rules” button on the Main Menu. If the window was closed the program was restarted and testing continued from the next point. Main Menu The Main Menu has one variable it needs to get from the User and needs to respond to a user clicking on Menu buttons. 24 | P a g e Alan Fordyce No. How it Was Tested Expected Result Actual Result 1 Started the program using run in Visual Basic with a breakpoint at the end of the form_load procedure. The program will set the strUserName variable to my school login account name. The strUserName variable was set to my school account login name. This name is the same one I use to log into the School Network. 2 Started the program using run in Visual Basic with a breakpoint at the end of the form_load procedure. The program will set the strUserName variable to “Alan”. The strUserName variable was set to ‘Alan’. 2.5 Started the program using run in Visual Basic with a breakpoint at the end of the form_load procedure. The program will set the strUserName variable to “12345qwerty!”£$%”. The strUserName variable was set to 12345qwerty!”£$%”. 3 Clicked the button and waited for the Window to appear. The Main Menu will disappear and the Game Board will show. The Main Menu disappeared and the Game Board was shown. 4 Clicked the button and waited for the Window to appear. The Main Menu will disappear and the How to play window will show. The Main Menu disappeared and the How to Play Window was shown. 5 Clicked the button and waited for the Window to appear. The Main Menu will disappear and the Game Rules window will show. The Main Menu disappeared and the Game Rules Window was shown. 6 Clicked the button and waited for the Window to appear. The Main Menu will disappear and the High Scores window will show. The Main Menu disappeared and the High Scores Window was shown. 7 Clicked the button and waited for the program to close. The program will close. The program closed. How to Play The How to Play Window has no Variables and only needs to respond to the User clicking the “Return to Main Menu” Button. 25 | P a g e Alan Fordyce No. How it Was Tested Expected Result Actual Result 1 Started the program using an executable, opened the How to Play window then clicked the ‘Main Menu’ button. The How to Play Window will disappear and the Main Menu will show. The how to play window closed and the Main Menu was shown. Game Rules The Game Rules Window needs to open an external text file and load the contents into a Textbox. The Rules Window has 1 variable, a text box and a button to return to the Main Menu. 26 | P a g e Alan Fordyce No. How it Was Tested Expected Result Actual Result 1 Started the program using an executable, opened the Rules window then clicked the ‘Main Menu’ button. The Rules Window will disappear and the Main Menu will show. The rules window closed and the Main Menu was shown. 2 The Rules window was opened from the Main Menu. The program will get all text from the file and display it in the Textbox. When the Rules window was opened the text appeared in the Text box. The text was checked against the External Rules file and found to match. 27 | P a g e Alan Fordyce High Scores No. How it Was Tested Expected Result Actual Result 1 Started the program using an executable, opened the High Scores window then clicked the ‘Main Menu’ button. The High Scores Window will disappear and the Main Menu will show. The High Scores Window closed and the Main Menu opened. 2 Started the program using an executable then opened the High Scores window. Checked the Contents of the Textbox with the contents of the Text File. The High Scores Window will appear with the Textbox filled with the High Scores from the High Scores file. The High Scores Textbox and Text File match. The High Scores Textbox is formatted correctly with the information in the High Scores File. Game Board No. How it Was Tested Expected Result Actual Result 1 Started the program using an executable, opened the Game Board then clicked the ‘Main Menu’ button. Clicked Yes on the Confirm Box. The Game Board Window will disappear and the Main Menu will show. The Main Menu opened as soon as the Main Menu button was clicked. The confirmation appeared afterwards. Clicked Yes and the Game Board closed. The Actual Result did not match the Expected. 2 Started the program using an executable, opened the Game Board then clicked the ‘Main The Game Board Window will not disappear. The Main Menu opened as soon as the Main Menu button was clicked. The Confirmation appeared afterwards. 28 | P a g e Alan Fordyce Menu’ button. Clicked No on the Confirm Box. Clicked No. The Game Board did not close but the Main Menu was still visible. The Actual Result did not match the Expected. The How to Play window opened and the Game Board was still open. 3 Opened the Game Board then clicked the How to Play button. The How to Play window will appear and the Game Board will stay visible. 4 Opened the Game Board then clicked the Rules button. The Rules window will appear and the Game Board will stay visible. The Rules window opened and the Game Board was still open. 5 Opened the Game Board, clicked the Begin button. Clicked on a card to hear sound. Clicked the Mute button. Clicked on another card to hear sound. The program will no longer play any sound during the game. The sound still played after the Mute button was clicked. The Actual Result did not match the Expected. 6 Clicked the Unmute button after doing No. 5 then clicked on a card. The program play sounds again during the game. The sound was already playing from a bug in No. 5. The Actual Result did not match the Expected. 7 Clicked the Exit button. Clicked Yes on the confirmation. The program will close. The program closed. 8 Clicked the Exit button. Clicked No on the confirmation. The program will not close. The program did not close. 9 Opened the High Scores file and edited the High Scores. My best score was set to 2 Minutes and 25 Seconds with 47 Tries. Used Visual Basic to run the program with breakpoint to check the Best variables. The program will get the High Scores from the external file into the High_Scores Record. The program will get the Best Score for the Current User. The variables were set to the correct score and the program displayed my best score formatted correctly. 10 Opened the High Score file and used Cut and Paste to move items about. Put the best time in the middle. Opened the Game Board then checked the High Scores file again. The program will use a simple sort to sort the High Scores file based on the best to worst time. The High Scores file will be sorted. The High Scores file was sorted from lowest to highest based on time. 11 Added code to have the program output the Random Numbers to a The random numbers for all the cards will be generated Every card had a double which it could be matched with. 29 | P a g e Alan Fordyce Text file. Used the Text file to check that there was an even amount of each number. Added a breakpoint after the Random Number generation to pause the execution. and placed into the FullDeck variable. There will be an even amount of each card e.g. two 2 of suite or four King of suite. 12 Continued after the Breakpoint in No. 11 with another Breakpoint placed after all the cards were filled and shown. Checked the Card Images against the Text file from No. 11. The Imageboxes will be filled with the random integer numbers from the FullDeck integer variable. The Images in the Imageboxes matched the Random values that were outputted into the Text File. 13 Tested in No. 12 using a breakpoint after the code to show the cards. The Card Images will be shown to the player. The Card Images were shown correctly. 14 Opened the Game Board and started a New Game. The Card Images will be hidden and the Back Images will be shown. The Card Images were shown then a timer appeared indicating the time left until the cards would be hidden. The cards were hidden after seven seconds. 15 Started a Game with breakpoints during the Card Click code to find the value of UserChoice(1). Checked that this value was the same as the Card that was shown on Screen. The back Image box will be hidden and the Card Image box will be shown. UserChoice(1) integer variable will be set to the Card Number based on the FullDeck integer variable. The back image box was hidden and the card image box was shown. UserChoice(1) was set to the value of the card as shown on screen. 16 Continued from the Breakpoint in 15 with another breakpoint during the Card Click code to find the value of UserChoice(1). Checked that this value was the same as the card that was shown on screen. The back Image box will be hidden and the Card Image box will be shown. UserChoice(2) integer variable will be set to the Card Number based on the FullDeck integer variable. The back image box was hidden and the card image box was shown. UserChoice(2) was set to the value of the card as shown on screen. 17 Continued from the Breakpoint in 16 with another breakpoint at the end of the procedure. Checked if the Boolean variable Match equalled true or false. The program will check if UserChoice(1) and UserChoice(2) equal. In this case Match was set to false because the Card numbers did not match. 17.5 Started the program again and The program will play the In this case two Kings were clicked. The match sound played, one was added to 30 | P a g e Alan Fordyce looked for two equal cards during the 7 seconds the cards were shown. Clicked on these two cards. match sound (unless the mute button has been pressed) and add one to Matches. The matched cards will be hidden. One will be added to tries. the number of matches which became 1, one was added to tries which became 1 and the Matched cards were hidden. 17.5 Started the Program then clicked the first two cards after the cards were hidden. Cards on the same line should not match with each other. The program will play the No Match sound. One will be added to tries. The cards Imageboxes will be hidden and the back Imageboxes shown. The match sound played, Matches stayed at 0, one was added to tries which became 1. The cards were hidden and the back images were shown. 18 Attempted to click on 6 cards instead of 2. The program will display a message telling the user to play the game properly and will not register and matches. A message appeared instruction me to play the game properly however, 4 of the clicked cards were shown. 19 During implementation a procedure was included to allow me to set some of the variables. These variables are: Minutes, Seconds and tries. Matches can be set to 26. Using this the Minutes was set to 99 and I waited for the minute. The program will display a message saying the player has lost and allowing them to restart. The program displayed a message saying time ran out. Clicking the OK button closed the Game Board and showed the Main Menu. 20 During implementation a procedure was included to allow me to set some of the variables. These variables are: Minutes, Seconds and tries. Matches can be set to 26. Using this the amount of Tries was set to 99 then I clicked on two cards to increase the amount of Tries. The program will display a message saying the player has lost and allowing them to restart. The program displayed a message saying that it had taken me too many tries to win. Clicking the OK button closed the Game Board and showed the Main Menu. 21 Using the procedure that was included during implementation, Matches was set to 26. During the Testing of the finished game I The program will play the win sound. All the card Images will be changed to Win Images and shown. The The win sound played, all card images were changed to the Win images, the program displayed a message telling me my score and then asked if I wanted to View the High Scores. 31 | P a g e Alan Fordyce will attempt to get 26 Matches while playing properly. program will display the Users score. The program will ask the User if they want to view the High Scores. 21.5 Set Matches to 26 then clicked the View High Scores button. The Game Board will disappear and the High Scores window will display. The Game Board closed and the High Scores Window opened. 21.5 Set Matches to 26 then clicked no to view the High Scores. The Game Board will disappear and the Main Menu will show. The Game Board Closed and the Main Menu Opened. Bugs and Errors Corrected Changed the Unloading Code to fix the problem where the Main Menu would show (and stay) before the program asked the user if they wanted to leave the game board. Attempted to fix the audio problem but discovered that the MMControl did not have any way to mute the Audio. The MMControl could have been changed to another Component but I decided to remove the sound functionality. Removing the sound functionality also adds the benefit of allowing the program to run on Computers that do not have Visual basic installed and lowering the Memory requirements. Testing of Finished Game After the program was tested using the Test Data the whole program was ran from start to finish multiple times. This was to ensure that a player would be able to play through a whole game and even play multiple games. After the program was tested by the programmer it was given as an executable to several family members, class members and friends. These computer users range from Novice to expert. They were asked to fill out the following questionnaire. Problems Encountered by the programmer: Not entering a Name into the Name Input box when starting the program would allow the player to continue without a name. Starting a new game after playing or winning a game would retain the score from the last game. One card was left at the end of the game, all matches were made and the game continued. Bugs and Errors Corrected Fixed the program continuing if a Name was not supplied. Fixed the program retaining scores when starting a new game. Concentration Card Game Testing Questionnaire. Play the game and rate the following aspects. One Star being the Worst and five stars being the Best. Insert a Tick or Cross into the boxes based on your rating. Ease of Use. Friendly User Interface. 32 | P a g e Alan Fordyce Difficulty of the Game. Help features available e.g. How to Play, Rules etc. Enjoyable. Compared to playing this game with real cards how easier is it to play the computer version? Did you find any bugs or encounter any errors? If so Please describe them. Any areas that could be improved? Any other comments about the game? Feedback Amount of testers: 6. Concentration Card Game Testing Questionnaire. The amount stars were added up and shown below. Comments that were left have been added to the spaces below. Ease of Use. 4.5 Average Friendly User Interface. 4.2 Average Difficulty of the Game. 2.7 Average Help features available e.g. How to Play, Rules etc. 4.2 Average Enjoyable. 4 Average Compared to playing this game with real cards how easier is it to play the 4.5 Average computer version? Errors Encountered. Two Testers encountered file access errors, Error Number 75 and 52. Two Testers reported that the High Score Table would not keep your second score. Two Testers reported that Cards were left over that could not be matched; one tester encountered this after quickly clicking multiple cards. Areas that could be improved. Increase the Amount of Tries. Increase the time the cards are shown at the start. More colourful User Interface. The speed at which the cards are displayed when clicked. 33 | P a g e Alan Fordyce Changes or fixes made based on Feedback Increased the amount of time the cards are shown at the start from 7 to 10. Increased the amount of time the clicked cards are shown from 1.5 seconds to 1.8 seconds. Fixed the High Score Table not keeping a second score. This bug would not have allowed any scores after the first score to be saved. Changes or fixes that could be made based on Feedback Due to the timescale of this project the following changes will be omitted because of the amount of time they will take to implement. A simpler change may be implemented if it is available. Increasing the amount of tries would require a rewrite of several areas of the program that use the High Scores. A simple change to this has been implemented. Since the High Scores are based on time when a player goes above 99 tries the value can be set to a constant 99. Changes or fixes that cannot be made I believe the Error Number 52 and 75 can be tracked down to the Tester missing files or because of the network restrictions in the school. 34 | P a g e Alan Fordyce User Guide Basic Information and Features Concentration is a card game in which all of the cards are laid face down on a surface and two cards are flipped face up over each turn. The object of the game is to turn over pairs of matching cards until all the cards have been matched. This game is a computerised version which aims to save you time over playing the game with real cards. Playing the game with real cards can be done with one or two players but this Computerised version only allows for one player. The computerised version offers the following features: Less time consuming over playing with real cards. Your score is saved and can be used as a target for you to beat or for competition with other players. Easy to use game which allows beginner computer users to play without any trouble. You can view your current play time, tries and matches while you play, no need to remember this yourself. The game can be run on most Windows Computer systems. Colourful and attractive card design. More… User Interface The game uses a Graphical User Interface. This allows even the most inexperienced Computer users to easily start playing. Getting Started Launching the Game To start the game you will need to double click on the executable named ‘Matching Card Game’. This executable can be found in the same directory as this User Guide and has a small Icon which looks like: Main Menu After being asked to use your Windows Account Name or enter one manually you will be presented with the Main Menu. From here you can Start the Game, view the How to Play information, view the Rules and view the High Scores. The buttons are located at the bottom of the screen and can be clicked with the left mouse button. 35 | P a g e Alan Fordyce How to Play The How to Play screen should be your first stop before playing the game. This screen will give you the required information to begin playing the game using a step by step approach. These steps are also listed below: 1. Click the Begin Current Game button which is located at the top of the Game Board. 2. The cards will appear for ten seconds and your goal is to try and memorise as many of the cards as you possibly can before the time runs out. The remaining time can be found at the bottom right of the Game Board. 3. Once the cards turn over you will be presented with 52 Back Images. The back images represent the location of the cards. Click on an image to pick your first card. Then click on a second image to pick your second card and check for a match. 4. Repeat step 3 until you have made all 26 matches. You will know this because the game will display a message stating you have won. This message will also include your score. 36 | P a g e Alan Fordyce Game Rules Much like every game Concentration has several rules which must be followed. These rules allow for a more fun and competitive experience. The rules of the game are as follows: 1. 2. 3. 4. 5. Only two cards can be picked in one try The picked cards must be of the same rank, colour does not matter, to gain a match The game should only be played with one player The player has to successfully match 26 cards to complete the game The cards will be turned over and one added to the amount of tries if the match is unsuccessful 37 | P a g e Alan Fordyce High Scores The game is capable of storing your score. Your score consists of your name, time and the amount of tries it took you to get all matches. The scores are sorted in descending order, this means that the best score is at the top and the worst score is located at the bottom. As you can see below the game gives you your position in the table to the left and your details to the right. 38 | P a g e Alan Fordyce Playing the Game The game can be started by clicking the ‘Start the game’ button which is the leftmost button on the Main Menu. The Main Menu will close and the Game Board will appear. You will see a large space in the middle of the Game board; this is where the cards will be shown. Once you are ready click the ‘Begin the Current Game’ button to show the cards. The cards will appear and you will have ten seconds to memorise as many card locations as you can. Once the time is up the cards will turn over and back images will appear. Click one of the cards you wish to match and the card will turn over. Click on a second card to match with this one and the selected cards will either disappear if you have a match or turn over if no match has been made. The aim is to match all the 52 cards to get 26 matches which will win the game. The game will tell you when all 26 matches have been made. It will display your time and tries and ask you if you want to view the High Scores. Clicking ‘Yes’ will open the High Scores Screen and clicking ‘No’ will show the Main Menu. If you wish to start a new game then click on the ‘Start a New Game’ button which is located in the same position as the ‘Start the Current Game’ button. This will ask you if you wish to close the Current Game and start a new one. Clicking ‘Yes’ will send you back to the Main Menu; click the ‘Start the game’ button to begin. You will also notice that there are two smaller buttons located to the left of the ‘Start the Current Game’ button. The ‘How to Play’ button will open the How to Play information and the ‘Rules’ button will open the Game Rules. Clicking either of these buttons does not end the game but they do not pause the game either. 39 | P a g e Alan Fordyce You can return to the Main Menu or Exit at any time. Clicking the ‘Back to the Main Menu’ button will ask you if you want to leave your current game; click ‘Yes’ and you will be returned to the Main Menu. Clicking the ‘Exit Game’ button will ask you if you want to exit the game; click ‘Yes’ to Exit. 40 | P a g e Alan Fordyce Technical Guide Installation The game will be stored in a Compressed Zip Archive. This helps to reduce transfer time and reduce storage sizes. To install the game right click on the Compressed ‘Matching Card Game’ Archive and select ‘Extract All…’ You must be running Windows XP, Vista or 7 to extract the files. A window will appear asking you where to extract the files to. It is advised to use the default folder which will create a ‘Matching Card Game’ folder in the current directory. Make sure the option ‘Show extracted files when complete’ is selected and click ’Extract’. The folder will open and you should find the ‘Matching Card Game’ executable and a ‘Data’ folder. If you are not running Windows XP, Vista or 7 then you can use an external, freeware program known as 7Zip to Extract the game. Link to 7-Zip: www.7-zip.org/ System Requirements To play the game it is recommended that your computer meets the requirements for the Windows Operating system as well as the following requirements: Link to Microsoft Windows 7 Requirements: http://windows.microsoft.com/enGB/windows7/products/system-requirements Microsoft Windows XP, Vista or 7. See the 7-Zip extraction above for earlier versions of Windows. 20 MB of free Disk Space. 16-bit or greater display with a resolution of 1024 x 720 or more. A Computer that does not meet the requirements may still be able to play the game but help and support is not available. Troubleshooting If you encounter any errors or problems then please check the following: Your Computer meets the System Requirements - Check above. The Data folder is located in the same location as the ‘Matching Card Game’ executable. All the files are located where they should be - see the file list below. You are not trying to open the game from a restricted location – try to create a file in the same directory as the game, if it fails then move the game elsewhere and try again. The Drive the game is located on has at least 5 MB of space. File List Using the directory where the ‘Matching Card Game.exe’ is located the following files should be located: Matching Card Game.exe Data/ Data/Rules.txt 41 | P a g e Alan Fordyce Data/High Scores.txt This file will be created when the game is started. Data/Images/ Data/Images/Back Data/Images/Back/Playing_Card_Back_1.jpeg Data/Images/Club Data/Images/Club/Playing_card_club_#.jpeg Where # is 1 to 13 Data/Images/Diamond Data/Images/Diamond/Playing_card_Diamond_#.jpeg Where # is 1 to 13 Data/Images/Heart Data/Images/Diamond/Playing_card_Heart_#.jpeg Where # is 1 to 13 Data/Images/Help Data/Images/Help/Help_Card_Click.jpeg Data/Images/Help/Help_Card_Show.jpeg Data/Images/Help/Help_Game_Win.jpeg Data/Images/Icon Data/Images/Icon/48px-French_suits_Icon.ico Data/Images/Spade Data/Images/Spade/Playing_card_Spade_#.jpeg Where # is 1 to 13 Data/Images/Win Data/Images/Win/Playing_card_win_1.jpeg 42 | P a g e Alan Fordyce Evaluation Overall my project was successful in meeting its objectives. Some features of the design were not implemented or removed at later stages but the solution fully meets its purpose and can be played from start to finish multiple times by all computer users. Fitness for Purpose The purpose of my project was to create an electronic Concentration game which would save time for the player over playing with real cards. My end program meets its purpose fully and allows the player to save time over playing with real cards. User Interface The User Interface of my program can be used by most computer users without any problems. The positions and styles of buttons are similar on all screens of my program which helps users find and identify what buttons do the task they need. I do believe that the interface could have been more user friendly. The colour style of my program is basic and only contains few colours which has been commented on by the testers. The green background colour was the best choice as this matches the colour on most game boards. Robustness The program could use some robustness improvements. If external image files are missing or the game is being run from a restricted location then the program will display an error and in serious cases crash. This will only be a problem if a user has deleted the data folder or they do not have write/read permission to the drive they are running the game from. The program may also crash if the High Scores file is edited. If the formatting of the High Scores file is changed then the program will not be able to get or sort the High Scores causing a crash. During Testing these were the main problems encountered by the Testers. Reliability Testers have reported that cards were left over at the end of the game but I and another tester have been unable to replicate this issue. This problem may exist as a rare bug for some users stopping them from completing the game. If the user clicks on a large amount of cards then the program may not register this right away. This may cause some cards to be matched. Other than these issues the program gives the correct results and can be played from start to finish as long as the user follows the rules. Portability Visual Basic allows an executable to be created which can be run on Windows computers. My program executable and data can be compressed in a .zip archive using the built in Windows Zip Compression and copied to any Windows computers. The program executable and data can be decompressed and ran on any Windows Computer. 43 | P a g e Alan Fordyce Efficiency The program is fairly efficient but could be improved in two areas. The first area is reading and writing to the High Scores. This code uses multiple IF statements to identify whether a 0 needs to be added/removed to/from the High Score. This could be more efficiently implemented using Case. The second area is the type of sort used to sort the High Scores. The simple sort is used which goes through all the scores regardless if they are already sorted or not. Maintainability Meaningful variable names have been used in most cases along with internal commentary to identify what the variable will be used for. The program has been split up into modules with internal commentary throughout them to identify what the code does. Limited parameter passing has been used and this could be improved on. Due to my style of programming it has often been said that my code could be made smaller and still achieve the same results. This can be seen in some areas of the program but should not affect maintainability. Image showing the declarations section of my program with Variable names and Internal Commentary. Features of the Solution The program has an attractive background and card design. The user can exit the game at any time. The program continues until all matches have been made. The program times the player and displays this at the end. The program stores 50 user names and times. 44 | P a g e Alan Fordyce The program is able to display the best 50 times in descending order. The program does show all the card values at the start then flip them over to start the game. The program does allow the user to replay until they decide to quit. The program does not allow the user to search the best times for their name and display them – this feature was not implemented due to time constraints. A simpler solution was implemented which shows the best time for the player while they are playing the game. The High Scores form allows the player to manually search through the scores. The program does display the current time and matches while playing. The program does not allow the user to view the cards again for help – this feature was removed after being implemented because it was breaking the program by not allowing the cards to be clicked again. The program does have a help feature such as a walkthrough or tutorial. The program does provide feedback that is easy to understand. The program does not provide the user with audio feedback – this feature was removed because the MMControl did not have any way to Mute the audio. Schedule Although I was originally going to follow the Gant Chart located earlier I decided to create a draft version of the program first then use this to work backwards and create the pseudocode. The pseudocode was edited and the changes were made to the program code. A project diary was created which lists when each task was carried out and how long was spent on these tasks. Time Taken for each Stage Using the Project Diary the time taken for each stage was calculated and rounded up to the nearest hour. Stage Time Taken Analysis 4 Hours The Analysis stage took an hour less than estimated Design 5 Hours The Design stage took an hour more than estimated. Language Learning 0 Hour The Language Learning stage did not take any time because of the decision to use Visual basic. This allowed the time to be used elsewhere. Implementation 20 Hours The implementation stage took the same amount of time as estimated. Testing 8 Hours 45 | P a g e Alan Fordyce The Testing stage took 3 more hours than expected. This was needed to find the required testers and fix the bugs that were found. Documentation 3 Hours The Documentation stage took an hour less than estimated. Evaluation 4 Hours The Evaluation stage has taken 4 hours which is 1 hour less than estimated. Total Time: 44 Hours 46 | P a g e Alan Fordyce