Web Application Project
WAD Ruby + TDD Assessment 2
Overview
In this assignment you are required to create the building blocks for a Web application based upon a modified version of the game Mine Sweeper. The game is to be designed for two players who play against each other. In the version you will be creating, players take the role of mine sweepers whose task it is to locate mines. Therefore, the objective is to find mines located at random locations as opposed to trying to avoid setting a mine off. The player to find the most mines wins.
IMPORTANT: To help you get started the files you must use are already provided. DO NOT rename or use any other files. However, ensure you make copies of these files regularly as a backup.
wad_ms_gen_01.rb contains the code which passes the tests
wad_ms_run_01.rb contains the game engine code
wad_ms_spec_01.rb contains the test specification which your code should pass
Developing the game building blocks
The assignment involves two stages: stage 1 requires the setting up of the given template files; and stage 2 requires each of the tests given in the specification file to be run, implemented and passed.
Stage 1: involves downloading the wad_ms_01.zip file from MyAberdeen and saving it to a new folder on your university H: drive. You should extract the three files given above and copy them to a new folder called minesweeper in your workspace. You should then open the wad_ms_spec_01.rb file and replace the name “Nigel Beacham” with your name and number “123456789” with your student ID number. You should save the file to the same location. You should not change this file, move or rename it thereafter.
Stage 2 involves you running the game specification test file to determine what tests have not been passed.
To run the test file, ensure the terminal command line prompt is set to the folder where the three files are located – minesweeper. You should then be able to run the tests by entering the following command.
rspec wad_ms_spec_01.rb
Note: you run the command rspec with the spec file.
To pass the tests you need to implement code in the wad_ms_gen_01.rb file, between the shown comments.
If the implemented code is correct you should see 0 failures reported with all ‘.’ characters and no ‘F’ characters appearing. Do not worry about the warnings.
Good luck!
Summary
In stage 1, download and amend the required files ready to start.
In stage 2, pass the tests given in the specification file.
Tests are run by entering the following command: rspec [filename_spec_01.rb]
Marking criteria
CGS D: You are required to setup the initial building blocks of code which make up the game within stage 1 and pass 50% of the tests by implementing code that passes the tests provided in the specification file using good coding conventions such as naming, commenting and indentation.
CGS C: You are required to setup the initial building blocks of code which make up the game within stage 1 and pass 60% of the tests by implementing code that passes the tests provided in the specification file using good coding conventions such as naming, commenting and indentation.
CGS B: You are required to setup the initial building blocks of code which make up the game within stage 1 and pass 70% of the tests by implementing code that passes the tests provided in the specification file using good coding conventions such as naming, commenting and indentation.
CGS A: You are required to setup the initial building blocks of code which make up the game within stage 1 and pass 100% of the tests by implementing code that passes the tests provided in the specification file using good coding conventions such as naming, commenting and indentation.
Note: in all above cases, marks will be deduced for providing no manual and/or no screenshots of your application and evidence of the number of passed tests.
What to submit
A single .zip file, containing all the files needed to run your game application tests including the specification file. The zip file must also include a manual [Student_Name_ID_manual.pdf] containing details of how to install and run the tests. It should be a single file and include:
System requirements and installation instructions. (i.e. software required to maintain and run the tests, etc.)
Screenshots illustrating the passing of tests.
How to submit both parts (a zip file and manual)
Your zip file, containing the application files, specification file and manual, should be named yourfullname-wadca2.zip (NB: replace yourfullname with your full name) and submitted electronically to the myAberdeen assignment page by selecting the heading ‘WAD Assignment 2’.
IMPORTANT: only zip files submitted to MyAberdeen will be marked. Zip files emailed to the tutor will not be marked.