开发者

Need suggestions for developing Scrabble like game in WPF

I开发者_如何学Go want to develop a game like Scrabble in WPF for which I need some suggestions

For Visuals: 1. What controls can be utilized to represent a (let's say 9 x 9) matrix? I would need ability to associate each cell with an id to know its state at all times during execution.

  1. How can I inject different visual properties to a cell of matrix?

  2. Would I need something like separate layers for base board, and tiles?

For logic: 4. How to go about validating a word and possible words around it?

Please advise. Thanks PJ


There is a complete solution on CodePlex here: Scrabble for WPF


I've posted a Reversi game on Codeplex at http://correspondence.codeplex.com. I used triggers to data bind properties of a square to styles of a cell. The same technique should work for scrabble.


Consider building your Custom Layout manager.

All you need to do is override the MeasureOverride and ArrangeOverride methods:

public class ScrabblePanel : Panel
{
  protected override Size MeasureOverride( Size availableSize ) 
  {
     // your code here
  }

  protected override Size ArrangeOverride( Size finalSize ) {}
  {
     // your code here
  }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜