2012/13

 
 

Deadline: 4pm Monday 4th November 2013

Example Output

Detailed Requirements


The full requirements are given (below):


  1. 1.Each game should alternate between starting with either the red or yellow player.  New games can be created by pressing a “New Game” button, which should also add a new board to the bottom of the table of past games. The turn order should be based on the game number, not based on who won the previous game.


  1. 2.A status label above the main playing area should provide information to the players.  In particular, it should:

  2. Indicate what the current game number is, and who’s move it is next if the game hasn’t been won.

  3. Indicate when the game has been won.

  4. Warn that an illegal move has been attempted (such as the user selecting full column).


  1. 3.A game-token or counter should be added to the bottom most empty row of a column after the user touches and releases a column.  It should not matter where in the column the user selects, to make a move, but they should be able to cancel a move after touching the board, by dragging their finger away from the playing area. The image for the counter should be position the images manually, using a CGContext (see below) onto a view. 

            Do not use UIImages on the board.


  1. 4.A “Plain” style table view should be used to keep track of past games.  A custom cell should be created that contains a view representing the game state of each past game, and a status label.  The status label should state the game number and whether or not it was won (note - you don’t have to state who’s go it would be next).  If a user selects an earlier game, then the main board should represent this game, and the user should be able to continue playing the game.


  1. 5.The application should be created with the following characteristics:

  2. a.Each class you create should be prefixed with your username.

  3. b.Use ARC to manage memory.

  4. c.DO NOT use storyboards.

  5. d.DO NOT develop Unit Tests.

  6. e.Create an empty project, and add to it a new view controller with a XIB file.

  7. f.Set the target device as iPad.

  8. g.Name your project FIAL2013.

  9. h.Make sure your name appears in a label on the main xib.

  10. i.Select only landscape orientations for your project.

  

This assignment contributes 10% to your overall mark for COMP327. The code should compile without warning or errors.  In addition, all of the source and resource files should be included in your project.


You should implement a UIView class, called prefixGameAreaView that is responsible for displaying the board and counters.  You will also need to create a custom cell called prefixGameCell  The game itself should be managed using a prefixViewController instance, subclassed from a UIViewController and the game model should be handled by the (supplied) Game model.


You can use any version of Xcode 4.4 (including the recently released Xcode 4.5) running under any version of iOS 6 or later.  However, do not use any new features introduced in iOS7.


Marking Scheme

The purpose of this assignment is to demonstrate that you know how to develop native iPad app using the Model-View-Controller design pattern.  You do not need to hand in any design documentation but your code MUST be well commented so that it explains what is happening in the code.  The following marking scheme will be used to assess each submission:


  1. View Controller: (20 marks total)

  2. Demonstrate an understanding of using IBOutlets and IBActions, by drawing the main view, including an instance of the GameAreaView, status label, and “Start Game” button, and managing this using a view-controller (10 marks)

  3. Capturing touch events and positioning the correct game-tokens in the Game Model, including detecting illegal moves (10 marks)


  1. Table View Controller and Custom Cell: (30 marks total)

  2. Constructing a Table View to represent past games, including a single entry when the application starts, and adding a new entry when the “Start Game” button is pressed (10 marks).

  3. Constructing and using a custom cell that displays past game positions in the cells of that table view (10 marks)

  4. Selecting cells of the table view, and allowing the user to play previous games (10 marks)


  1. GameAreaView: (20 marks total)

  2. Draw the board (or represent the image of the board), and counters on the board based on the status of the Game Model. (20 marks)


  1. General: (30 marks total)

  2. Ensure that the code does not include fixed board sizes, but can handle sizes other than 7x6 (10 marks)

  3. Adhering to all of the requirements and submission guidelines, and including all resources and sources in your submission (10 marks)

  4. Design/Style and Layout (10 marks)


Hints

The solution to this assessment will be similar in style to that for the SketchMe Lab, and is similar to the TicTacToe assignment in previous years (2012, 2011, 2010).  A model solution for the 2012 assignment is here (TicTacToe2012.zip), and should provide a number of hints that should help you when developing your solution.  However, there are some fundamental differences, so do not try to adapt the previous solution, but understand it and start fresh.  Also, there are other code hints that are explained in previous assignments - it might help to understand these.


Other hints may appear here, so check back...


SUBMISSION INSTRUCTIONS


Firstly, check that you have adhered to the following list:


  1. 1.Your project should be self contained within a single zip file containing all of the files in the XCode project. The file's name MUST be 'FIAL2013.zip'.  Ensure that all of your source files and resources are included in the project (hint, unpack it in a different directory and check it still builds).

  2. 2.Your project is developed within XCode, not some other language or environment.

  3. 3.Your program compiles and runs on a machine within the computer science department’s Mac Lab, either under Xcode 4.4, using the iOS SDK 6 (recently released) or an earlier version. If you have developed your code elsewhere (e.g. your own mac), ensure that it also works on our system before submission. It is your responsibility to check that you can log onto the department’s system well in advance of the submission deadline.

  4. 4.Your program does not bear undue resemblance to anybody else's! Electronic checks for code similarity will be performed on all submissions and instances of plagiarism will be severely dealt with. The rules on plagiarism and collusion are explicit: do not copy anything from anyone else’s code, do not let anyone else copy from your code and do not hand in 'jointly developed' solutions. 

 

To submit your solution you must SUBMIT IT ELECTRONICALLY, and adhere to the following instructions:


Electronic submission:

  1. Your code must be submitted to the departmental electronic submission system at: http://cgi.csc.liv.ac.uk/cgi-bin/submit.pl?module=comp327


  1. You need to login in to the above system and select ‘Assignment 1’ from the drop-down menu.  You then locate the file containing your program that you wish to submit, check the box stating that you have read and understood the university’s policy on plagiarism and collusion, then click the ‘Upload File’ button.


Work will be accepted only if it is submitted electronically following the above instructions.


Plagiarism will not be tolerated.  There are several ways in which this can be detected from the project files submitted, so don’t do it!


Finally, please remember that it is always better to hand in an incomplete piece of work, which will result in some marks being awarded, as opposed to handing in nothing, which will guarantee a mark of 0 being awarded.  Demonstrators will be on hand during the COMP327 practical sessions to provide assistance, should you need it.