Vous êtes sur la page 1sur 2

COSC2433 Introduction to Programming

Project 3 Due: Friday 21st of May 2012 10% of Assessment

Aim: This project tests your ability to design and implement an animation in Alice utilising IF statements, events, loops methods and parameters. Scenario: "Snake!". A scene contains a hungry snake and two rabbits. Initially, the rabbits are invisible. The animation starts with one of the two rabbits being randomly selected, becoming visible and running across the scene. Once the rabbit has finished running, another random rabbit selection is made and that rabbit runs across the scene etc. This continues as long as the snake is visible. The running rabbit runs 8m in steps of 0.5m ( each of which has a duration of 0.5s ) and then vanishes. The snake will try to eat the running rabbit. This involves continually pointing at the rabit and moving forward 0.5m, until the rabbit has either finished running and vanished, or the snake succeeds in getting less than 1m from the rabbit. If the snake is less than 1m from the rabbit, the rabbit is eaten (it vanishes). If the user presses the spacebar, the snake will be vanished. Requirements: You should implement the above scenario using the provided initial file catchase.a2w. Marks will be allocated for intelligent use of methods and method parameters, so you should carefully consider how these could be used in your program. Restrictions: This project is working in groups of two (Optional). You are not allowed to create variables, write new functions, or add objects (apart from those already in the initial snake file). The only permissible events are 'when the world starts' and 'when a key is typed'. Submission: You must include the names and student numbers of the authors as a comment at the start of your World.myFirstMethod (otherwise your partner won't receive marks!). You will need to submit your program file, and an html listing of your code (produced by using Filest >ExportCodeForPrinting in Alice). : This assignment due on 21 May 2012.

Submission Guide

Assignments MUST be in the form of a report with page number and stapler it together. The following elements MUST be a part of every programming assignment:

Code Design Cover Page

1. Cover Page 2. Design (Storyboard, visual only & flowchart) - Sketch out the visual storyboard (NOT print screen) and draw the flowchart accordingly 3. Code (softcopy [via BlackBoard7 Digital Dropbox] and hardcopy. You must include the names and student IDs of the authors as a comment at the start of your World.myFirstMethod (otherwise your partner won't receive marks!) Note: You are advised to keep a copy/backup the project for yourself. It might be useful for your revision.

Vous aimerez peut-être aussi