# Open circuit for game

Hi, I like to know how to create logic for a weapon in the game which should not make a close circuit while place it on the game screen.

Its like there are (x,y) number of rows and columns. The user is allowed to place the weapon on the screen. The screen looks like a chess board. Full of odd number of rows and columns in the shape of squares.

Now the user can place the weapon on these squares so that as and when the enemies come they detect using collusion and the if its on firing range they fire to the enemy.

So now the weapon can be placed such that it should not form a closed circuit, that is it should leave one square empty so that the enemy moves out.

The enemy has a start state and a goal state. And it moves in the form of elephant of a chess game.

The enemy starts from say suppose top of a screen and moves one one square and doj’s the weapon and reaches other end of the screen.

SO i like to know how to stop the weapon from making a closed circuit?

Erm. You have a grid. You can place a weapon. What exactly are the rules for placing the weapon? Saying that you don’t want it to “make a closed circuit” doesn’t mean anything to me. Maybe try again describing what rules you want to follow? Also, you want to follow these rules for placing the weapon? For firing the weapon? For moving the enemies?

Rest all I can manage…What i want to know that …

In all total there are 9 columns and 11 rows, in all total 99 squares of 24 x 24 ok.
Weapons are places inside the squares. But it should not make a close circuit. Means I cannot block the whole row full of weapons. Say there should be a 24 x 24 cell left for the enemy to move around.

If i create a square or rectangle ,I should leave a 24 x 24 cell left so that the enemy passes through, from start state to the goal state.

The game is like iphone field runner. Kindly see the video in youtube and see how the weapons are placed.

Place the weapon, run your A* from start to finish, if the finish cannot be reached, disallow the placement of the weapon.