Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

You are required to complete the question.

Name your C program file as "game_name1.c" (the team leader's name without spaces and should not more than 20 characters, for example game_alex.c). If you use separate files for your main program and functions, then you need to zip all the files (.c and .h) in a .zip file and submit. You are required to:

- Submit the softcopy of the C program file (*.c or *.zip) to Elearn at location ‘Assignment -> Assignment Submission'. (Note: only the ‘.c' and ‘.h' file, not the whole project). Only one submission required per team by the team leader.

- Submit the hardcopy report to your lecturer, the hardcopy should include the printout of your code with the cover page and marking scheme, and all the testing output screenshots.

NOTE: Your submission must include a cover page with the name and signatures from all members in the group and the marking scheme. Report without a cover and marking scheme will not be accepted. Student without name and signature in the cover page will not be honoured the mark.

Question 1

Build a game solution for "Alice-in-the-Wonderland" in C program, where the game allows player to:
a) start a game:

The rules of game are:
i. The game should have a 15 rows x 20 columns map marked with asterisks (*). Indicate the entrance and exit with a symbol of your choice. In the map, there are items scattered randomly as below (you decide how many of each that you need):
- Life (#): the player will earn a life
- Poison (!): the player will lose a life
- Trap (O): the player will move backward a random number of steps (1 to 10).
- Ladder (H): the player will move forward a random number of steps (1 to 10).
Note: You can place certain items manually whichever you think appropriate (e.g. put more traps near to the exit)

ii. The mission of the player is to safely walk through the map from the entrance to the exit. If player overshoot the exit, it need to reverse back.

iii. The game should allow player to choose among 2 types of game:
- Player 1 and Computer
- Player 1 and Player 2

iv. The game should allow player to choose among 3 stages of difficulties. For example:
- Beginner: less poisons and traps
- Advance: more poisons and traps

v. Each player of the game will carry 5 lives from the start. The game will end when one of the below condition is met:
- The player who first reach the exit will win the game.
- The opponent who run out of life will lose the game.
.
vi. The players will take turn to throw a dice (with value 1 to 6) to decide how many steps to move forward. If the player is the computer, throw the dice automatically. You need to indicate the position of the players in the map with a symbol of your choice.

vii. Once the game is over, the screen should display the total number of steps each player has taken, and the remaining life of each player.

viii. The score is based on number of steps taken, the lesser the steps the better. If the score is within the top 5 scores, the score will be stored into a file.

Example of the game board once the game start:

S

*

*

*

O

*

*

*

!

*

*

*

*

*

*

*

*

*

O

*

*

*

*

H

*

*

O

*

*

*

*

*

*

!

*

*

*

*

*

*

*

*

*

*

*

#

*

*

!

*

*

*

*

O

*

*

*

#

*

*

*

*

*

*

*

*

*

H

H

*

*

O

*

*

*

*

*

*

*

*

O

*

*

*

!

*

!

*

*

*

*

*

*

H

*

H

*

*

O

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

*

*

*

*

*

!

*

H

*

*

*

#

*

*

O

*

*

*

*

*

#

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

*

*

*

*

*

*

*

*

*

*

!

O

*

*

*

!

*

*

*

*

H

*

*

*

H

*

H

O

*

*

*

*

H

*

*

*

*

#

*

*

*

*

!

*

*

*

*

*

*

#

*

*

*

*

*

O

*

*

*

*

O

*

*

*

*

*

!

*

*

*

*

*

H

!

*

*

*

*

*

*

*

H

*

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

!

*

!

*

*

#

*

*

*

!

*

*

*

*

*

O

*

!

*

*

*

*

O

*

*

*

*

*

*

*

O

*

*

#

*

*

H

*

O

O

O

*

H

O

*

O

*

E

b) display the top 5 scores:
List the top 5 scores in order.
c) reset the top 5 scores list:
Delete the top 5 scores list.
d) exit game:
Display "Thank you and see you next time".

The solution should have input data validation, and design using proper logic and data structure. You are required to use multi-subscripted array

You're encouraged to improve your code structure by using functions, add in any additional controls, validations or messages which you think are appropriate.

Variances of display design, arrangement or style are allowed, as long as it fulfilled the game requirement stated above.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92055802
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Programming Language

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As