Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i need to input a sample tentaizu problem(like "enter tentaizu table: 1 - - - 2 - - (etc.)") and then check if it is a valid tentaizu problem
solve the problem(like "enter location: ") and then check if the desired location is possible for an *

What I have tried:

I just dont know how to check if the table is a valid tentaizu problem
Posted
Updated 13-Apr-16 15:18pm

1 solution

Well, there's a lot you dont tell us - do you have any code at all for example ? how do you store the table ??

My guess is, you would have

- a routine to input table elements
- the ability to store table elements in array 'x by y' elements
- routines to get data from row x column y from the table
- routines to (possibly) look at adjacent cells/examine a row/examine a column
- a routine to validate the puzzle (what you are asking for) built on the above ?
- a routine to solve the puzzle - possibly using backtracking or such

I'm pretty sure that the routine to validate the puzzle would be pretty close to the routine to solve the puzzle and/or you need to inspect 'cells' and adjacent cells to see if they match 'rules' (the rules of tentaizu ie)

tentaizu seems a lot like minesweeper - you may find algorithms if you google for (eg) 'solving minesweeper' that you can apply - ie, is a backtracking or brute-force approach best ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900