Im coding a dice in ruby in which when i rolled it, it would either come up north south east or west.
what im having trouble with is when i roll it how do i tell it to return to me one of these directions?
any help would be great.
Use Array.sample
:
[ 'north', 'south', 'east', 'west' ].sample