September 2023 Implement a child s selection game In the standard version of this game a group of children gather in the circle

2024 Programing C a child’s selection game Assignment Help

Implement a child s selection game In the standard version of this game a group of children gather in the circle 2023

Implement a child’s selection game. In the standard version of this game a group of children gather in the circle and begin a rhyme. Each word of the rhyme is chanted in turn by 1 person in the circle. The last person is out of the game, and the rhyme is restarted from the next person. Eventually, 1 person is left and he or she is the lucky individual who gets selected. Your application should read the total number (or names) of players and the words of the rhyme from the keyboard. The intermediate output are numbers (or names) of players called by each word of a rhyme, players that get removed from the circle after each round, and updated lists of players. The final output is the number (or name) of one remaining (selected) player. Interesting links related to this game: http://www.cut-the-knot.org/recurrence/flavius.shtml http://webspace.ship.edu/deensley/mathdl/Joseph.html Details of implementation. Use an array of strings rhyme for storing list of words in the rhyme and circular doubly linked list (of integers or strings) for storing players. Create files CircLinkedList.h and CircLinkedList.c with declarations and implementations of the following functions. Header file CircLinkedList.h should also contain definitions of types: Node (structure with fields data, next, and prev), NodePtr, LinkedList (structure with fields head and tail) and LinkedListPtr. • LinkedListPtr initLinkedList() /*allocates dynamic memory for the linked list, initializes its head and tail to NULL */ • void insertTail(LinkedListPtr list, int data) /*inserts a new node containing data after the last node, but if the list is empty – as the head of a linked list */ • void display(LinkedListPtr list, NodePtr start) /*displays all the data in a circular doubly linked list, starting from a start node*/ • void removeNode(LinkedListPtr list, NodePtr nodeToDelete) /*removes a node from a circular doubly linked list Create application file CountingGame.c containing the following functions • NodePtr sayRhyme(char rhyme[MaxNumWords][MaxWordSize], int numWords, LinkedListPtr list, NodePtr startingPlayer) /*simulates one round of the game: ➢ output the player starting a rhyme ➢ for each word in the rhyme print out the player and the word that he says ➢ output the player which is to be removed (the one who says the last word) and the next one in a list – the new starting player (store the pointers to the nodes containing these players) ➢ remove the player from the list (calling removeNode) ➢ print out the updated list of players (calling display) ➢ return the pointer to the node storing the new starting player */ Sample output of sayRhyme: Starting this round from Player 1 Player 1 says “eeny”, Player 2 says “meeny”, Player 3 says “miny”, Player 1 says “moe” Player 1 is removed Starting the next round from Player 2 (next after Player 1). Remaining players: 2,3. • int main(int argc, char argv[]) creates and displays an array of words in a rhyme (inputted by a user) and a list of players, then simulates playing the game repeatedly calling sayRhyme in a loop until it has just 1 player (startingPlayer ->next== startingPlayer), which is then announced a winner of the game */

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational