Talk:Tic-tac-toe: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎lang tag and line width: Now looks fine.)
(→‎Design issues: new section)
Line 4: Line 4:
: It's never been a problem for me; is this in fact due to the box containing the code being constrained in width by the result of the {{tmpl|task}} template? If so, the problem will go away (or at least become purely characterized by the width of the browser window, as is good and proper) once there are some more implementations. –[[User:Dkf|Donal Fellows]] 10:04, 4 February 2011 (UTC)
: It's never been a problem for me; is this in fact due to the box containing the code being constrained in width by the result of the {{tmpl|task}} template? If so, the problem will go away (or at least become purely characterized by the width of the browser window, as is good and proper) once there are some more implementations. –[[User:Dkf|Donal Fellows]] 10:04, 4 February 2011 (UTC)
::Oh. Looking at it from work, things seem to be fixed. Thanks?! --[[User:Paddy3118|Paddy3118]] 10:51, 4 February 2011 (UTC)
::Oh. Looking at it from work, things seem to be fixed. Thanks?! --[[User:Paddy3118|Paddy3118]] 10:51, 4 February 2011 (UTC)

== Design issues ==

A few notes on the Tcl solution that are perhaps of more general interest.

I decided to keep the game core separate from the players. Although this makes the code quite a bit longer, it also makes it clearer what the responsibilities are and how much knowledge they can have (they know their letter, they can see the board and the legal moves on it) and so it properly demonstrates that it ''is'' a game. Well, in my opinion anyway. –[[User:Dkf|Donal Fellows]] 09:33, 5 February 2011 (UTC)

Revision as of 09:33, 5 February 2011

lang tag and line width

I notice that the lang tag is setting a severe maximum line width before scrolling. I would suggest it not be done or be set to something large e.g. 160 characters. --Paddy3118 07:15, 4 February 2011 (UTC)

It's never been a problem for me; is this in fact due to the box containing the code being constrained in width by the result of the {{task}} template? If so, the problem will go away (or at least become purely characterized by the width of the browser window, as is good and proper) once there are some more implementations. –Donal Fellows 10:04, 4 February 2011 (UTC)
Oh. Looking at it from work, things seem to be fixed. Thanks?! --Paddy3118 10:51, 4 February 2011 (UTC)

Design issues

A few notes on the Tcl solution that are perhaps of more general interest.

I decided to keep the game core separate from the players. Although this makes the code quite a bit longer, it also makes it clearer what the responsibilities are and how much knowledge they can have (they know their letter, they can see the board and the legal moves on it) and so it properly demonstrates that it is a game. Well, in my opinion anyway. –Donal Fellows 09:33, 5 February 2011 (UTC)