[GOODIE]BlackSheep - a simple game
danielv at netvision.net.il
danielv at netvision.net.il
Mon May 22 21:17:17 UTC 2000
In general - it's cute, it's pretty, it's short and simple. That's a
great start!
Karl Ramberg <karl.ramberg at chello.se> wrote:
[RFC - coding style]
> !BlackSheep methodsFor: 'initialization' stamp: 'kfr 5/16/2000 15:39'!
> addCloseBox
> | closeBox |
> closeBox _ SimpleButtonMorph new borderWidth: 1;borderColor: #raised;
> cornerStyle: #square;
> label: '' font: Preferences standardButtonFont; color: Color darkGray;
> actionSelector: #delete; target: self; extent: 10 at 10.
> closeBox addMorph: (StringMorph new contents: 'x'; font:(StrikeFont familyName: #ComicPlain size: 16); position: 2 @ -5; color: Color black).
> self addMorph: (closeBox position: 8 at 5)! !
The code is visually a bit crowded. You could note the spacing
conventions (after keywords, for example) in most code. An alternative -
I simply use the pretty-printer. It's not always the prettiest code, but
it's reasonable, it's consistent, and it doesn't take my attention from
coding.
Darn it, I didn't remember games could be this simple. Been too long
since the Commodore days...
Thanks for the reminder, Karl!
Daniel
More information about the Squeak-dev
mailing list
|