Wouldn't generating a random number be simply something like this?
rnd := (1 to: 100) atRandom.
Once you've got it, you can assign alternative messages to the receiver c
:
(rnd > 50) ifTrue:[c := VisibleSquare new]
(rnd < 51) ifTrue:[c := InvisibleSquare new]
...which I think can as well be expressed as
c := rnd > 50 ifTrue[VisibleSquare new] ifFalse:[InVisibleSquare new]
Maybe this is what you wanted to know. However, since this is for the generation of a maze layout, you maybe should come up with something more sophisticated than just randomly putting walls. There are probably some algorithms which are fun to implement with the functional programming features that smalltalk seems to be equipped with. Think about having a look at the Wikipedia page on Maze Generation Algorithms, which this page is based on, featuring code samples in various languages.