Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise: Playing Farnarkle (pair) This is a pair exercise to complete with your lab partner Complete the function play_farnarkle in farnarkle.c void play_farnarkle(int hidden_tiles [N_TILES])

image text in transcribed

Exercise: Playing Farnarkle (pair) This is a pair exercise to complete with your lab partner Complete the function play_farnarkle in farnarkle.c void play_farnarkle(int hidden_tiles [N_TILES]) // PUT YOUR CODE HERE play_farnarkle should given a hidden tile sequences, reads guesses from a human player, printing the number of farnarkles and arkles for each guess, until the human player guesses the sequence Use read_tiles to read the guesses farnarkle.c contains a main function which will let you test play_farnarkle For example: $ ./farnarkle Enter0 to call count farnarkles Enter 1 to call count arkles () Enter 2 to call play farnarkle () Enter 3 to call test ai farnarkle player () Call which function: 2 Enter guess for turn 1: 1578 0 farnarkles, 1 arkles Enter quess for turn 2: 2 3 46 3 farnarkles, 0 arkles Enter guess for turn 3: 2 347 2 farnarkles, 0 arkles Enter quess for turn 4: 2386 3 farnarkles, 0 arkles Enter guess for turn 5: 2 316 4 farnarkles, 0 arkles You win When you think your program is working you can use autotest to run some simple automated tests 1511 autotest play_farnarkle When you are finished on this exercise you and your lab partner must both submit your work by running give: $ give cs1511 wk05_play_farnarkle farnarkle.c Note, even though this is a pair exercise, you both must run give from your own account before Friday 6 April 23:59:59 to obtain the marks for the lab exercise Exercise: Playing Farnarkle (pair) This is a pair exercise to complete with your lab partner Complete the function play_farnarkle in farnarkle.c void play_farnarkle(int hidden_tiles [N_TILES]) // PUT YOUR CODE HERE play_farnarkle should given a hidden tile sequences, reads guesses from a human player, printing the number of farnarkles and arkles for each guess, until the human player guesses the sequence Use read_tiles to read the guesses farnarkle.c contains a main function which will let you test play_farnarkle For example: $ ./farnarkle Enter0 to call count farnarkles Enter 1 to call count arkles () Enter 2 to call play farnarkle () Enter 3 to call test ai farnarkle player () Call which function: 2 Enter guess for turn 1: 1578 0 farnarkles, 1 arkles Enter quess for turn 2: 2 3 46 3 farnarkles, 0 arkles Enter guess for turn 3: 2 347 2 farnarkles, 0 arkles Enter quess for turn 4: 2386 3 farnarkles, 0 arkles Enter guess for turn 5: 2 316 4 farnarkles, 0 arkles You win When you think your program is working you can use autotest to run some simple automated tests 1511 autotest play_farnarkle When you are finished on this exercise you and your lab partner must both submit your work by running give: $ give cs1511 wk05_play_farnarkle farnarkle.c Note, even though this is a pair exercise, you both must run give from your own account before Friday 6 April 23:59:59 to obtain the marks for the lab exercise

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions