15,997,402 members
See more:
Hello !
i'm Need To Create A Simple Sokoban Game, in this game we have One Box And One Target.
```+ the game rules is:
- the worker Only can push the box.
- the box only can moved in(left,right,top,down) direction.
+ The Map Define Role is:
- . is ground
- # is wall
- B is box
- g is target
- s is worker```

i can Get The String By This Format And Put This To 2d Char Array. Some Example Come Bellow :
```.	.	.	.
.	S	B	.
.	#	#	.
.	.	G	.```

Now I Have A Matrix Of Game Map.
Now I Need To Find The Shortest Way Between Box And Target With All Following Algorithms.
```1- BFS
2- DFS
3- Bidirectional
4- A*```

+ Please Talk Me How I Solve The Matrix With This Algorithms.
Thank You,My Masters ...
Posted
Updated 6-Jan-12 6:45am
v2
Sergey Alexandrovich Kryukov 6-Jan-12 11:41am
The game is not fully described. What's your problem? Is it your homework?
--SA
MEkramy 6-Jan-12 16:41pm
HiThank You. More Describe :
i have a matrix that its contain game map(also Box,Worker And Target Location). i only need to find the shortest way in matrix between box and target by graph algorithms (BFS,DFS,A* And Bidirectional). But I Don't know how solving this matrix with graph algorithms.
some sample of game map:
screen

## Solution 2

No Body Help Me!
i have Short Time To Solve This Algorithm.
help..

Richard MacCutchan 7-Jan-12 5:10am
Did you look at any of the links I posted for you?
MEkramy 7-Jan-12 7:11am
Yes Thank You.
But in my Project i have a button.this button work is : Help The Worker To Find Shortest Way Between Box And Target.
this program is not a game. its a algorithm for solving the game with graph algorithms (BFS,DFS,A*) And algorithm must find shortest way.it's a Artificial intelligence program.
However thank you for your helping. please take me a code. good luck.