Classic strategy game "honeycomb war" record version: Flag grabbing Mode

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.