Let's start off the life of the new Challenges forum, with you implement life itself (well at least Conway's version of it).
- Create UI-agnostic class that is capable of simulating Conway's Game of Life.
- Create a UI that displays the current state of the game.
- Any cell with fewer than 2 neighbors dies (of loneliness)
- Any cell with 2 or 3 neighbors, survives into the next generation.
- Any cell with more than 3 neighbor dies (of over crowding)
- Any dead cell with exactly three neighbors, becomes alive (as if by reproduction)
The world on which these cells live is a Torus.
So the top and a bottom edges are connected and the left and right edges are connected.
- Publicly you can only create instance of them via one of, the following two factory methods.
Dim cwi = ConwayGame.CreateNew( Width:= 320, Height:= 240 )
Dim cwi = ConwayGame.CreateNew( Width:= 320, Height:= 240, AliveCells:= 25000 )
Must be capable of generating at bitmap of the current state of the Conway Game, via the following shared function.
Dim bmp = ConwayGame.ToBitmap( ThisInstanceOfConwayGame )
The instance must have a function that returns to number of Alive Cells.
Dim acc = ThisInstanceOfConwayGame.AliveCellCount()
- Frameworks required.
- vb.net submissions are preferred.
- SourceCode must be in spoilered code tags.
If you don't want to reveal your code, then don't submit a submission.
- If you like you can include a Zip-File of the project / executable.
This post has been edited by AdamSpeight2008: 01 January 2012 - 11:36 PM