Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

School of Computing and IT

CSCI444/944 - Perception and Planning - 2023

Assignment 2

(20 Marks)

Date due: before 15.30 PM on Wednesday, 13 September 2023 (Week 8)

This assignment should be completed and demoed during your Week-8 Laboratory class.

You should also hand in a printed report to your Lab supervisor when you demo your work.

Submit your work according to the submission instructions at the end of this document.

Aim: On completion you should knowhow 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 Resources webpages.

For this assignment you are required to develop a Tic-Tac-Toe game VI with LabView.

Step 1 (5 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.

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

Step 3 (2 marks) 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.

Step 4 (2 marks) Win line When the game ends and if someone wins, a line is drawn across the winning row, diagonal or column, as shown below.

Step 5 (2 marks) 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.

Step 6 (2 marks) 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.

Documentation (5 marks): Write a design document detailing the structure of your Tic Tac Toe game and explaining its functionality. Your documentation should include the following aspects:

1.   Introduction: Provide an introduction to your Tic Tac Toe game, outlining its purpose and the main features.

2.   LabView Design Visualization: Include visual representations, such as figures of the front panel and block diagram, to show the layout and structure of your game.

3.   Game Functionality Explanation: Explain how the game functions, including the logic behind player interactions, win conditions, and game flow.

4.   Innovations and User-Friendly Enhancements: Detail any innovative features or

improvements you have implemented to enhance the attractiveness and user-

friendliness of the game such as artwork, headings and/or sound effects, etc.

5.   User Manual: Create a user manual that offers clear instructions on how to play the  Tic Tac Toe game. Ensure that users can easily understand the rules and mechanics.

Submit:

Your assignment is due during your lab class in week 8. Your submission will consist of:

•    A hard copy including:

•    a completed and signed cover sheet

•    technical details showing the design of your game VI.

•    a user manual on how to play the game.

•    Name your programs: " TicTacToegame.vi" and your report: "username.docx" (where username is your unix username).

•    Put all files comprising your programs and the report document in a zip file named: 2- namestudentnumber.zip where, make sure you also include any sub- VIs used by your program, and submit to the Assignment 2 submit folder on Moodle.

You are required to demonstrate and talk about your assignment in your lab class in Week 8 ( 13 Sep 2023 Wednesday in Session ).

Late Submission of Assessment Tasks and Penalties

Assessed work must be handed in by the date and time given.

•    Late assignment submissions will attract a penalty of 50% of the total possible marks of the assessment item for each day or part thereof that the item is late, to a maximum penalty of receiving zero marks for the assessment item.

•     Submissions received 2 days after the due date will not be assessed

•     Submissions received 2 days after the due date will receive no marks.

•    If an assessment is submitted late, it will be marked in the normal way, and a penalty will then be applied.

•     Submissions received 15 days after the due date will receive no feedback. However, lecturers may choose to provide feedback at their discretion.