This game is called Kaivas.She was brought to the Boardwalk city on the Volatinsky shopping arcade, and orphans smashed it up and down through the Green Blood.At the Dornish court, everyone was obsessed with her ... Ten pieces, each of which walks differently, and the board changes with each game, depending on how the players shuffle their squares.
George Martin "Feast of the Vultures"
Cyvasse is another game born in a piece of art. And as is usually the case, the matter again did not go without the participation of an army of fans. Although the author pays great attention to the game (in “Dance with Dragons”, Tirion Lanister only does what plays it), a detailed description of the rules, yet it is not the author’s work of the artwork. However, for the fans, "not rusted." A variety of implementations "Kayvassy" dozens. Square and hexagonal - there are for every taste! I want to talk about the one that I liked the most. Most versions of Kaiwassa (I cannot say for everything, I could have missed something) - these are all the same chess that we are used to since childhood, only with catapults and dragons. Yes, the pieces walk unusually, and on the board, with a generous hand, you can scatter mountains and ponds, but the principles of the game itself do not change - chess taking and the king, who must be eaten. Zane Fisher approached the issue more creatively. In my opinion, his version of the game is much deeper, in tactical terms. Due to what? So let's go and see.
Most of the "naturalness" and forethought - that's what first caught my eye. See how the "cavalry" bypasses the "mountains". Each figure, in this game, can move no more than a specified number of steps and, performing a “quiet move”, it can “rotate” as you please, the main thing is not to return to the previously passed cells and not to enter the territory occupied by the enemy or “mountains” ". It is possible to pass through the cells occupied with their own figures (the exception is “Elephant”, which cannot be passed “through” other figures), one cannot only complete the turn on them. ')
It was a challenge!
It so happened that in purely technical terms, it is not easy to implement such wandering on the ZRF . The course of a figure consists of several steps in an arbitrary direction, as a rule, with the additional condition of not visiting fields already passed. I made a game with similar mechanics, but at that time I used the mechanism of partial moves (and even then not very successfully, in rare cases the figure could drive itself into a dead end). When I really thought that I could not do without the Axiom , the decision itself, suddenly, suddenly occurred to me:
Lot of code
(define check-target (if (position-flag? is-target?) (set-flag is-succeed? true) ) ) (define check-target-dir (if (and (on-board? $1)(position-flag? is-target? $1)) (set-flag is-succeed? true) ) ) (define check-dir-3 (if (on-board? $1) $1 (if (not (or enemy? (piece? Mount))) (check-target) (if (not-speared?) (check-target-dir $2) (check-target-dir $3) (check-target-dir $4) ) ) (opposite $1) ) ) (define check-branch-3 mark (if (on-board? $1) $1 (if (not (or enemy? (piece? Mount))) (check-target) (if (not-speared?) (check-dir-3 $1 $1 $2 $3) (check-dir-3 $2 $1 $2 $4) (check-dir-3 $3 $1 $2 $5) ) ) ) back ) (define move-3 ( (check-pass) (set-position-flag is-target? true) START (while (on-board? next) next (set-flag is-succeed? false) (if (or empty? (piece? Point)) (check-branch-3 w sw nw se ne) (check-branch-3 nw w ne se e) (check-branch-3 ne nw ew se) (check-branch-3 e ne se nw sw) (check-branch-3 se e sw ne w) (check-branch-3 sw se we nw) (if (flag? is-succeed?) add) ) ) )) (piece (name LightHorse) ... (moves (move-3) ... ) )
In fact, everything is simple. Instead of trying to pave the way from the current field (with this approach, it would be difficult to deal with duplicates of the generated moves), you can mark it with a positional flag, and then, having gone through all the board fields (there are few of them, a small board), try to get to the marked fields for a given number of steps. It doesn't sound very impressive, but for me it was a turning point. From this point on, I believed that the game can be implemented on a pure ZRF.
The capture is carried out only "in a straight line" and, in most cases, according to the "chess principle" - the figure performing the capture becomes the place of the taken figure (here again there is an exception - the "Catapult", which I will discuss below). In this case, you can not take any shape! Zane introduces the concept of “engagement”. As well as taking, “hooking” extends in a straight line, the number of steps is individual for each type of figure.
The concept of “engagement” is closely related to the “armament” of the figure. All figures are divided into light, heavy and not armed. “Rabble” ( Rabble ) - lightweight figure, can not just attack a heavy, for example, “Elephant” ( Elephant ). In order to attack, he needs to “engage” the target with another light (or heavy) figure. On the other hand, the “Elephant” can easily attack the “Militiaman” (except, perhaps, for the case when it is in the water). He can also single-handedly hook on any heavy figure of the enemy, even the “Dragon”. Unarmed figures (“Crossbowman” and “Catapult”) can be taken without “hooking”.
It was also not easy
Basically, because of the amount of scribbling. Different figures have different hooking distances, and indeed they are different. “Dragon” - can fly through the mountains, “Spearmen” cling to only two fields in front of you, you need to take into account the action of “water”, and checking for the presence of friendly / enemy “Fortresses” nearby - this is generally dark. In general, everything is difficult (and it is possible that there are errors in the code), but everything seems to work as intended:
As I said, a lot of scribbling, but from that moment on, the development of the game became, for the most part, a mechanical work. There was, however, another moment with Rabble , but more on that below.
The “hooking” distance coincides with the maximum distance of the figure's stroke only in the simplest cases ( Rabble , Spears and King ). The usual situation is when the distance at which the “engagement” is possible is less than the maximum stroke of the figure ( Light Horse , Heavy Horse , Dragon ). However, there is an exception. “Elephant” ( Elephant ) - a heavy figure moving only one cell per turn, but it can “hook” an enemy figure at a distance of two cells! Moreover, he can eat it by moving into two cells, but only on the condition that the path is not blocked by any obstacles (unlike other figures, the "Elephant" cannot pass through the cells occupied by other figures. All these features make the game even more interesting, in the tactical plan. See, for example, the solution of one of the tasks of the textbook :
The distance "gearing" for cavalry - edinichka. In order to take an enemy figure (in the absence of other figures that perform "hooking"), you will have to come close, but during the battle there is freedom of choice - to stop on the field of the taken figure or move on (like a woman in checkers ). The maximum distance is three steps for Light Horse and two for Heavy Horse . Detailed parameters of all figures can be found in the game manual :
Rabble (x6) - light armor, movement allowance 1, engagement range 1
Spears (x3) - light Armor, Movement Allowance 1, Engagement Range 1
Light Horse (x3) - light Armor, Movement Allowance 3, Engagement Range 1
Heavy Horse (x2) - heavy armor, Movement Allowance 2, Engagement Range 1
Elephant (x2) - heavy armor, Movement Allowance 1, Engagement Range 2
Crossbows (x2) - unarmored, Movement Allowance 2, Engagement Range 3
Trebuchet (x1) - unarmored, Movement Allowance 1, Engagement Range 4 (min. 2)
Dragon (x1) - heavy armor, Movement Allowance 4, Engagement Range 2
Tower (x2) - heavy armor, Movement Allowance 0, Engagement Range 1
King (x1) - light armor, Movement Allowance 1, Engagement Range 1
You can also find information about the features of each of the figures. Some of these notes are embarrassing. For example, the following is written for the Crossbows: " Crossbows cannot capture ". What may need a figure unable to take the figures of the enemy? Again, the whole thing in the "gearing"! Crossbows are an unprotected figure incapable of close combat, but it can “capture” enemy pieces at a great distance. The next task from the tutorial illustrates this. If the “Crossbowman” moves in such a way as to “capture” all the targets, the “Horseman” can beat them in three moves:
Unfortunately, there is an annoying flaw in the problem
The distance of the “quiet run” of Light Horse is quite enough to move to a position from which he can kill all three enemy figures without assistance. In my implementation, I corrected this by moving the “Horseman” figure below.
Another unarmored figure is the "Catapult" ( Trebuchet ). There is nothing wrong with taking here! The figure strikes from a distance, at a distance of two to four steps (the enemy can not beat the catapult close up). The uniqueness of this figure is that after the capture of the "Catapult" continues to remain in the rear. To take an opponent's piece, she moves one step in the opposite direction (of course, if there is free space there)! This is an important strategic weapon, “Catapult” must be protected in every possible way!
There would be no happiness, but misfortune helped
In the process of preparing the game for publication, I needed examples of the initial arrangement of the figures. This is not a simple matter and I tried to approach it with all care. At first glance, there is almost no space left for figures. Something is occupied by mountains, something is water (I also do not want to be thrust into it). Fortunately, everything is not as bad as it seems, since most of the figures can freely pass through the territory occupied by other friendly figures. The cavalry may well be put in the second row, behind the "Spearmen" and "Militiamen". You can put a dragon anywhere - it flies over the mountains. After a few minutes of torment, I did something like this:
I sent the distribution to the publication and only then noticed that the "Catapults" are extremely unfortunate. Yes, I left a place behind them, but in the original version of the game, they do not know how to shoot through the mountains! Perhaps this screenshot would have remained an amusing incident, but an interesting idea came to my mind: “why not catapults and shoot through the mountains, because they shoot a canopy”? Thus, the following addition was born: if a mountain suddenly appeared on the way, the “Catapult” cannot perform “hooking”, but as soon as the “gunner”, already hooked on the target, was found, pulsating the stone over the mountains “Catapult” is quite capable! In my opinion, this is a good idea, adding even more tactical possibilities to the game.
"Fortress" ( Tower ) - another very strange figure. She doesn't move! Totally. In general, it is even logical. Where (except for Japanese cartoons ) have you seen moving fortresses? The task of the fortress is protection (and it copes well with this task). A figure located near a friendly fortress cannot be "hooked". To kill her, you first have to destroy the fortress, but it is not easy. In addition, "King" ( King ) is able to "jump" through the friendly "Fortress", being on the other side of it in one turn.
It is believed that the fortress does its job too well
This is the last problem from the textbook , which, in theory, should be solved in seven moves. Do not misunderstand me. King, in this position, you can eat "Rider" in just three moves! Provided that he will not react to anything when the “Horseman” jumps close to him. In real life, it does not happen. For me, it is obvious that by moving the “Catapult” to the right and taking the “Militiaman” that is interfering with it with the help of the “Elephant”, the task could be solved in the allotted number of moves. But the fortresses interfere As long as the Spearmen are next to them, they cannot be “targeted”, and they are closing the “King”! The original rules state the following:
Except for the adjacent tower (s)
Perhaps there was a situation in mind when a figure could “hook” and a “Fortress” and the figure protected by it (that is, it stands close to both of them). I do not know. This is a good topic to think about. In the meantime, I allowed the “Dragon” ( Dragon ) to take a figure under the protection of the fortress from a distance of two steps (within the range of its “engagement”, but not close). In my opinion, this is a bit more lively game.
It is worth telling about two of the weakest figures, to which, equally, the expression “small and removed” is appropriate. Spears is, in a sense, an analogue of a chess pawn . It can only go forward and attacks only two fields in front of itself (although it doesn’t turn into anything). How can such a figure be useful? Of course, she has a secret. Two fields controlled by it (only two) none of the enemy figures can “slip” in one turn. For example, this means that the cavalry cannot attack the "Spearman" from the front, even if he is "hooked" by another figure. First, it must come close. Spears is an excellent defensive unit, reminiscent of the "Bodyguard" ( Chi ) from the Mongolian game Hiashatar .
With Rabble, things are a little simpler. They can walk (and "beat") one step, in any direction, like the "King". The trick is that the player has the right to make two "quiet" moves by the Militiamen in a row. This is an attacking unit. By making two "quiet" moves, you can create two threats at different ends of the board. One “Militiaman” is likely to be eaten, but others will be able to organize a breakthrough. I like this decision too much.
Although it gave me a number of problems, in terms of implementation
This is the case, the order of moves in ZRF (and in ZoG as a whole) is rigidly defined. If each player always had to make two moves (as in the " Marseille chess "), it would be easy. Something like that:
(turn-order White White Black Black)
But we need to ensure that the right to repeat the move is granted only after the “quiet” Rabble move and that the second move is also the “quiet” move, but already another Rabble . And nothing else! And, by the way, the right , but not a duty . Right here, I had to make compromises. It was clear that the pass mechanism could not be done here, but the author on this point put it very clearly: " He must move a piece, or forfeit the game ". Fortunately, ZoG provides a mode in which a pass is performed (automatically) only in the absence of any allowed moves (this is of course not entirely correct, since, when using this option, the player will not be counted a defeat, in the absence of the possibility of a move).
The solution is not perfect. Moving the first Rabble, we mark it with an attribute, after which, the player is already obliged to find and move some other Rabble (his opponent just skips one turn). During the second move, by the way, the set attribute is removed and if this does not happen, the game will most likely just stop. Therefore, it is very important, even on the first move, to find at least one otherRabble and, if there is no such, not to include all this magic! As usual, the back mind came up with the idea that it would be good to check the possibility of a move with this very other Rabble . Fortunately, it was quite simple. So the patch was born.
It remains to tell about the terrain. In addition to the figures, “mountains” and “reservoirs” can be located on the board. Everything is clear with the “mountains” - not a single figure can be placed “on the mountain” and only the “Dragon” can fly over the mountains. Of course, the "mountains" overlap the "review", preventing the "hooking" of enemy figures (I have already spoken about the nuance with the "Catapult"). With "ponds" all the more difficult. Figures can be placed in them, but with the loss of the possibility of “hooking” by them of enemy figures. This also adds to the tactical diversity of the game.
In this place, ZoG also has its own characteristics.
If with “mountains” everything was simple (well, figures and figures), then “water” caused troubles. No, in principle, I could also make it figures. I did it once, and that's where it all led . This was not a lag, but such a constructive feature! However, at that time there was no choice. Drawing green squares on a black background would take a lot of time and double the already-half-megabyte distribution kit, 90% full of radical black backdrops.
In general, this time, I drew water directly on the board, simultaneously marking it as a playing area in the game description. Unfortunately, in this way, you can draw any , but only a rigidly fixed map. About any copyright "Nine Tile" is no longer talking. It's a pity ... but there's nothing you can do.
Well, in general, that's all. The game is published , with the kind permission of the author . The interface came out worse than in the original version (for example, the “hooks” are not highlighted), but the AI ​​works. In any case, the tasks of the textbook solves "with a bang."
Plays, in principle, is also quite responsible (especially if the computer is more powerful, but the time for "thinking" is set more.
I really liked the game. In tactical terms, it seemed to me no less complicated than Ko Shogi , which favorably differs from the latter with greater “brevity” and thoughtfulness. All figures work! And for the game quite a relatively small board. And I will think about how to weaken the “Fortress”.
PS
In general, everything just turned out to be with “Fortresses” (I made it up to myself from scratch from scratch). The rules of the game is written very clearly:
There is no way for you to get there.
That is, if the figure is located close to the enemy "Fortress", it can "hook" only the "Fortress" and no other figure! As a result , the ninth task of the “ textbook ” is solved exactly as it was planned by the author, and the updated version of the game is laid out on the Zillions of Games .
Pps
As is usually the case, during the process of writing the first postscript to this article, I suddenly realized that I did not take into account all possible situations. The picture below illustrates the problem:
In this position, "Dragon" should "hook" only the closest "Fortress", and not both at once. When you delete the nearest "Fortress", the remaining "Fortress" and "King" must fall into battle. Here is the appropriate fix. It should be noted that the situations analyzed in postscripts in the game, although possible, are unlikely. Due to this, all the games that I had previously saved remained correct after the implementation of the described changes to the implementation of the game.