For a long time did not write the article, this game has actually written for a while, has not perfected, in the new Year's occasion, to share to everyone.
The "Five sub-fly" game, not the usual everyone said "Gobang", this play is simple, is our hometown children often play a puzzle game, we first look at the board layout:
The rules are as follows:
First, black and white both sides (each other black, our white) each hold five children, respectively placed on the sides of the sideline;
Second, the pawn can only go straight line (oblique line is also), can not turn;
Third, as long as there is no pawn (either side of the) can jump lattice walk;
Four, can clamp dead each other or can pick each other two pieces (1 for sunspots, 0 for White,-blank):
- Clip one: Any one line, there are only two pieces each one, two pieces next to each other, at this time if we have a pawn can go through a straight line to the other side, you can put black pieces to die, replace the previous one of our pieces. Like what:
- Originally is--10-, if the white son can walk to from the left number 2nd position -010-, then the sunspot eats: -000-
- The original is---10, if the white son can go from the left number 3rd position--010, then eat the sunspots:--000
- The original is--100, if the white son to go from the left number 2nd position-0100, cannot clip dead sunspots, because the right one more.
- Pick a pair: Any line, there are two pieces of each other, and two pieces in the middle of a blank position, at this time if we have a pawn can go through a straight line to the middle of two pieces, you can eat the other side two pieces, replaced by our pieces. Like what:
-
- The original is -1-1-, if the white son can go to the middle position -101-, then the two sunspots to eat changed into white son: -000-
Five, win: the other pieces of all eat, or death can not move.
Well, the next Zhang Rivot began to use code to achieve layout, moves, eating chess and so on. Please look forward to it.
Html5+js "Five sub-flying" game implementation (a) Rules