Re: How do you copy an array?



Kim Minh Kaplan wrote:
> you don't need to copy your grid; just play and takeback
> the moves as you traverse the tree.

Geoffrey Summerhayes wrote:
checkers requires keeping the state of the
moved piece to 'unking' when necessary, go needs to restore captured
pieces, and chess has additional state information that isn't contained
in the board position that needs to be kept track of.

Thanks for the help. Just as I'm starting to learn functional programming, this grid seems to be a good counterexample in support of mutable state. I've been trying to avoid assignments as much as possible, but it looks like you can pay a heavy price for that in performance.

--
My name is dsb, and I'm at prairienet, which is an O-R-G.
.



Relevant Pages

  • KeyPreview/KeyDown on TreeView control - Possible Bug?
    ... We have a dialog containing a treeview on the left displaying groups ... in the grid. ... Shift-F2 can still be intercepted by the form. ... We use F2 to rename a group within the tree, ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TreeView or DataGridView ?
    ... tree view control with a grid control, ... You could get a third party grid which supports heiarchical data ... preferably in another grid view below it wich is indented, ...
    (microsoft.public.dotnet.languages.csharp)
  • NestedGridViews was TreeView or DataGridView ?
    ... gridview for now wich was a piece of pie - just followed a simple sample. ... third-party grid implementation that can handle this for you, ... wich is unlike most tree structures. ... a tree view control with a grid control, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: TreeView or DataGridView ?
    ... what I realy need is a grid with sub grids, ... wich is unlike most tree structures. ... I wish to display and edit 3 collections of different object types, ...
    (microsoft.public.dotnet.languages.csharp)