Vous êtes sur la page 1sur 3

University of Wollongong

School of Computing and IT

CSCI444/944
Assignment 2

Perception and Planning


(Due: Week 5, Wednesday 26 August, 1.30pm)

Spring 2015
15 marks

Aim: On completion you should know how to:

Design and Implement LabView VIs and sub-VIs incrementally


Debug LabView code and fix any problems.
Process multi-modal information from the user interface and files.
Create and utilize VIs for your applications.

Make sure you read the instructions carefully. Further instructions and assistance will be
provided during your laboratory class and via the Discussion and Resources web pages.
For this assignment you are required to develop a Tic-Tac-Toe game VI with LabView.
Step 1 (10 marks). Try to make the front panel of your game look something like that shown
below. For this game the User is always 'X' and always goes first. To make a move the user clicks
on the position with the mouse. The computer can make a random move in the available position.
There should be 5 rounds per match and the score should be displayed, as shown below.

The user (and computer) should continue to make moves until someone wins, or the game is
drawn. After each game, the score is updated until the final (5th) game is played to end the match.
Five seconds later Game Over is displayed in the top string and either I win or You win is
displayed flashing in the bottom string, depending on who won the match.
1

Step 2 (5 marks) Add the following enhancements to your program.


a) Arty Design Add artwork to your front panel to improve the appearance of your game.
This can include lines, shapes, colours, and imported images.

b) Different First Player Modify your program so that who goes first is randomly chosen at
the start of the match. After each game, the first move should be made by the other player
(i.e. computer or user). So if you went first for the first game, the computer goes first for
the second game, etc.
c) Win line When the game ends and if someone wins, a line is drawn across the winning
row, diagonal or column, as shown below.

d) Top Score Add a data file named TopScore for recording the top score and name of the
person who achieved the top score. When the program starts, the top score file is read and
the top score is displayed in the top string and the name of the top scorer below it, as shown
below (on the next page). At the end of a match, if the user beats the top score, or if no top
score file exists, a dialog appears and asks the user for his or her name. When this is done,
the high score file is updated with the new top score and name of the user.

e) Computer Voice Add sound (computer voice) to your VI. When the game starts, or 10
seconds after the match ends, the computer repeatedly says: Press start to commence a
new game every 10 seconds. When the start button is pressed, and 3 seconds after each
move, the computer says: My Move or Your Move depending on who moves next.
When a game ends the computer says Game over plus:You win or I win or Draw
depending on the game outcome. When the match ends the computer says: Thanks for
playing. If the user beats the top score, the computer says: Congratulations, you beat the
top score,
Bonus (1mark) Make the computer smarter so that it looks for winning opportunities.

Submission
Your assignment is due during your lab class on the due date. Your submission will consist of:
a hard copy including:
a completed and signed cover sheet
a technical details showing the design of your game VI.
A user manual on how to play the game
Put all files comprising your program and report in a zip file named: 2-username.zip where
username is your unix username, and submit it to UNIX using the following command:
o $ submit -u username -c CSCI944 -a 2 2-username.zip
You are required to demonstrate and talk about your assignment in your lab class in week 6.

Late submission (hardcopy or softcopy) will receive a 1 mark deduction for each day late.
Late demonstrations will receive a 1 mark deduction for each week late.

Vous aimerez peut-être aussi