U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer U00102 Foundations of Computer ProgrammingProgrammingProgrammingProgrammingProgrammingProgrammingProgrammingProgrammingProgrammingProgrammingProgramming Coursework 2 (25% of module mark) Deadline: Friday 2nd May Introduction For this assignment you will implement a set of functions that work together to simulate a game called Nim. There are several versions of this game but the one that you are going to implement has a nice winning strategy. In this game two players will alternatively take marbles from a pile. They can take any number of marbles but at least one and at most half of the marbles. The player who takes the last marble loses. Part 1 You will implement a program where the computer plays against a human opponent. The game will start with a random number of marbles between 10 and 100. A random number between 0 and 1 will be used to decide who takes the first turn (0 computer, 1 human opponent) and the human opponent has to decide whether he or she wants the computer to play in a novice or expert mode. In the novice mode the computer will always take a random number between 1 and half of the marbles that there are in the pile at the...

  • 10 years ago
Foundations of Computer A+ Tutorial use as Guide
NOT RATED

Purchase the answer to view it

  • foundations_of_computer.docx