The code is wrong but I get what you are trying to do. You can't do this because your basically saying, if you roll a 1, Dice1 becomes 1, but if anything else is rolled, Dice1 becomes 2. What if a 3...