none
Logic For FUTOSHIKI RRS feed

  • Question

  • Hi i am trying to build a application similar to FUTOSHIKI.. but i am finding difficult with logic so can any suggest the logic... thanks in advance :)
    Tuesday, July 5, 2011 6:09 AM

All replies

  • I have never played the game, but after looking at the rules, I would have a grid of N X N to represent the game board.

    I would make a list of conditions that have a left cell right cell and condition, less than or greater than.

    I would have a cell object, with coordinates and a value.

    When a cell is evaluated, I look at the conditions to see if there are any conditionas and if they are met.

    If the conditionas are fine, I would then have the grid validate each row, going cell by cell to make sure each cell value is  greater than 1 and not greater than N. I would also check that each cell value is found only once and no values between N and 1 are missing.

    I would repeat the process for columns.

     

    Once all conditions, rows and columns are good, the user wins.


    Louis
    Friday, July 22, 2011 7:57 PM