2012 conmajia 'byo' <conmajia@gmail.com>
Cellular wars is a classic niche strategy game. Because of the small crowd, it is necessary to introduce it.
Refer to the following (from hivebattle, the review version of cellular warfare).
More than two players participate in the game and follow the turn-based system. Each player can move a hexagonal pawn in each round, but after the pawn moves, it must ensure at least one pawn in the six grids around it. That is to say, there cannot be new "isolated islands" (the isolated islands formed by the removed pawns are not restricted ).
Each time a player moves a pawn, the "flag" as the target will randomly escape 1 grid away from the surrounding area. The player's goal is to take advantage of the terrain or directly use the pawns to "restrict" the color of the flag (default Player 1 is blue) in the 1 cell so that it cannot be moved, then the flag is successfully snatched. The following is an example of a successful flag grabbing.
Note that if the encirclement breaks down, the flag will escape.
Here is an animated demonstration of the game for your reference (large and slow loading)
This gameCodeThis article does not elaborate on the code. It only describes how to draw a beehive.
1. Design a drawhex () method for drawing a single beehive
2. Based on the designed honeycomb size, draw all the bee chambers from top to bottom and from left to right, and skip the holes.
3. Draw pawns and banners
ReferenceSource code: Download
2012 conmajia 'byo' <conmajia@gmail.com>