Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Need suggestions for developing Scrabble like game in WPF

Need suggestions for developing Scrabble like game in WPF

Scheduled Pinned Locked Moved WPF
questioncsharpwpfgame-devtutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mittalpa
    wrote on last edited by
    #1

    Hi I 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. 2. How can I inject different visual properties to a cell of matrix? 3. 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

    Follow your goals, Means will follow you ---Gandhi---

    P A 2 Replies Last reply
    0
    • M mittalpa

      Hi I 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. 2. How can I inject different visual properties to a cell of matrix? 3. 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

      Follow your goals, Means will follow you ---Gandhi---

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      mittalpa wrote:

      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.

      You could use a simple grid for this. I wouldn't worry about associating the cell with an id to know its state - keep track of this with your model instead. It's a much better mechanism for this as you can use binding to keep associate it with the visuals. You've already worked out that you are going to use a matrix, so you know that you can just represent the word on the board with the matrix.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • M mittalpa

        Hi I 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. 2. How can I inject different visual properties to a cell of matrix? 3. 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

        Follow your goals, Means will follow you ---Gandhi---

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        mittalpa wrote:

        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.

        Like the other guy said, use a Grid (or DataGrid or ListView or a custom control) and modify your view model when dealing with state.

        mittalpa wrote:

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

        Use properties on your view model to determine what your view displays. WPF is rich with ways of dealing with what to display, such as template selectors.

        mittalpa wrote:

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

        WPF allows you to layer things easily. However, you wouldn't necessarily NEED to layer... might make some things easier though.

        mittalpa wrote:

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

        There are word lists you can download for free. There is one from an old version of a dictionary (1916 Merriam Webster?), for example, that you could download, parse, and use when validating that the words used are valid. You could also create a web crawler to find words on the Internet... and you could allow users to enter their own words. As far as the validation logic itself, just focus on the view model rather than the view.

        [Forum Guidelines]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups