Starting from:
$30

$24

CENG Homework 1 Selim Temizer Solution

In this homework assignment, you will be implementing two games in C Programming Language. You are provided with stub code and some utility services (you are free to use or not use the provided utility services) in the homework bundle. The stub code contains some parts that are already implemented for you, and some functions that you should implement yourselves (marked with the comment TODO in the code). The Linux executables (64 bit) of my sample implementations for both games are also provided in the homework bundle; you can run them to try various inputs and see how your implementation should respond (try to match the output syntax exactly).

Part One – Tic-Tac-Toe (40 points)

Your implementation will let two human players play the classical game of Tic-Tac-Toe by taking turns. You should check all user input, and if necessary, ask the users again for input until correct input is provided by the users.

Part Two – Dungeons and Dragons with Wumpus (50 points)

The text based classic game of Dungeons and Dragons now receives a special appearance by the famous Wumpus of the Hunt the Wumpus game. The game will first be configured by the user (the single player of the game), and then the player will move from room to room in search for the gold. The unlucky adventurer will face cold death if she enters a room with a Wumpus in it. The lucky adventurer will be able to grab the gold and exit the dungeon without running into any evil Wumpuses lurking in the dungeon.

Part Three – Analysis (10 points)

Write a report to answer the following questions:

    1) In the Utilities.c file, why does the randomIntegerMaxUnBiased function generate more fair random numbers than the randomIntegerMaxNaive function? Make sure you have a sound and rigorous proof (don’t just mumble about your guesses and undeveloped ideas).

    2) In the game of Dungeons and Dragons with Wumpus, scientifically analyze the probabilities of the adventurer to:

        a. Get eaten by a Wumpus
        b. Exit the dungeon without the gold
        c. Exit the dungeon with the gold

Page 1 of 2


What to submit?

We are only asking for just 3 files:

    • The first file is the implemented TicTacToe.c file.
    • The second file is the implemented DnDW.c file.

    • The third file is the report that should have the name Report and an appropriate file extension (you may prepare your report in WORD, PDF or TXT formats).

You don’t need to submit the Utilities.x files, we already have copies of them.

Zip the 3 files above (tar also works, but I prefer Windows zip format if possible), name the compressed file as <ID>_<FullNameSurname> (with the correct extension of .zip or .tar) and submit it through COW. For example:

e1234567_SelimTemizer.zip



There are a number of design decisions and opportunities for enhancements and creative extensions that are deliberately left open-ended in this homework specification. We have enough time until the deadline to discuss your suggestions and make further clarifications as necessary. There will be bonuses awarded for all types of extra effort. Late submissions will NOT be accepted, therefore, try to have at least a working baseline system by the deadline. Good luck.




































Page 2 of 2

More products