COMP 2131 Programming Assignment-1

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

COMP 2131

Programming Assignment-1

100 marks = 8% of final grade

Getting started in C

1. Introduction

The purpose of this assignment is to get familiar with C Language, use functions and array, and learn how to design a simple game with a friendly user interface using C Language.

2. Instructions

You can use nano or any other editor to write your C code.

3. Steps:

In this assignment, you will create a simple Tic Tac Toe game designed for one player (against the computer). You will need to create arrays and functions to complete this program.

1.   The first screen should ask the user for his name, print a welcome message, and displays an

empty 3x3 Tic-Tac-Toe board. Then, the program should ask the user to put the coordinates of his move.

Once the user enters the coordinates, the program should respond accordingly with a print of the user’s move and the computer’s move. This should go on until a winning pattern is found.

After you complete the program, copy the code from UNIX environment to Notepad in windows and upload the ‘C’ file to the Open Learning Faculty Member.

Marks Distribution

Steps

Completed Upto

Marks

I

Game Board designed

25

II

User Inputs taken and marked on the board

25

III

Validate the inputs i.e. no two

inputs at same place and no

input outside the range

20

IV

Check the winner/loser and complete the game

30

Total

100



发表评论

电子邮件地址不会被公开。 必填项已用*标注