$ java Nm 5 Welcome to Nm Player 1: Computer Player 2: Human Remaining matches: 5 Computer removes 1 matches Remaining matches: 4 Your move. There are 4 matches 1 Human removes 1 matches Remaining matches: 3 Computer removes 1 matches Remaining matches: 2 Your move. There are 2 matches 1 Human removes 1 matches Remaining matches: 1 Computer loses, Human wins. $ java Nm 5 Welcome to Nm Player 1: Computer Player 2: Human Remaining matches: 5 Computer removes 1 matches Remaining matches: 4 Your move. There are 4 matches 2 Human removes 2 matches Remaining matches: 2 Computer removes 1 matches Remaining matches: 1 Human loses, Computer wins. $ java Nm 5 Welcome to Nm Player 1: Computer Player 2: Human Remaining matches: 5 Computer removes 1 matches Remaining matches: 4 Your move. There are 4 matches 9 Sorry, illegal move. Please choose at least one match and at most 2 Your move. There are 4 matches -1 Sorry, illegal move. Please choose at least one match and at most 2 Your move. There are 4 matches 2 Human removes 2 matches Remaining matches: 2 Computer removes 1 matches Remaining matches: 1 Human loses, Computer wins.