From: Luke Cowell Date: 2009-05-07T06:43:18+09:00 Subject: Re: One Die Game (#203) Why do I feel like I'm doing someone's homework assignment ? Here's my attempt at the quiz: http://www.pastie.org/469635 I know Daniel asked that the computer sometimes make a mistake (for fun), but my computer is not really into having fun. It's a type-a, aggressive, winner takes all computer. Don't mess with it. I'm throwing the gauntlet down. Write you own computer opponent and we can have them battle it out! Subclass Player: class MyRadAI < Player Create a method next move: def next_move(dice, opponents) opponents is an array of the other players and each opponent has name and score accessors. the dice class has some convenient methods available to you to figure out which moves are available: def available_nums def valid?(choice) is also useful. Luke -- Posted via http://www.ruby-forum.com/.