Week 8

  1. Write a program where the use enters the number of blacks and number of white pegs as command line arguments and the program prints out all the combinations that match this black/white peg configuration. To do this you should write mathod called match, which takes an array representing a comibination of colours and two integers reprsent in the number of black and white pegs. The method should return a boolean.

  2. Define a Data Structure for storing the current state of the mastermind game. Write a method for checking whether whether a new guess is a possible solution give the current state of the game.



s.danicic@gold.ac.uk
Sebastian Danicic BSc MSc PhD (Reader in Computer Science)
Dept of Computing, Goldsmiths, University of London, London SE14 6NW
Last updated 2015-09-04