World Conquest Chronicles

World Conquest Chronicles

lualife, v1.5.2

The library that implements Conway's Game of Life.

Refactoring and supporting of textual representation for size, simple field, and placed field models.

Change Log

  • models:
    • size:
      • supporting of textual representation;
    • field:
      • supporting of textual representation;
    • placed field:
      • supporting of textual representation;
  • refactoring:
    • extract the implementation of textual representations for models to a separate mixin;
    • improve error handling.

Features

  • models:
    • size:
      • supporting of checking if a point is inside;
      • supporting of checking if an other size with offset fits inside;
      • supporting of textual representation;
    • point:
      • supporting of translation;
      • supporting of scaling;
      • supporting of textual representation;
    • field:
      • storing only of set cells:
        • ignore outside points;
      • supporting of counting of set cells;
      • supporting of checking if a cell is set:
        • ignore outside points;
      • supporting of checking if an other field fits inside;
      • supporting of mapping;
      • supporting of textual representation;
    • placed field:
      • extends the field model;
      • storing a field offset;
      • working with cells taking into account the field offset;
      • supporting of checking if an other field with offset fits inside;
      • supporting of copying the existing field with setting an offset;
      • supporting of textual representation;
  • generating of a random field:
    • customizable filling factor;
    • limiting by a cell count:
      • lower limit;
      • upper limit;
  • operations with fields as with sets:
    • union of fields:
      • supporting an offset for the second operand;
      • restricting of the result size by the size of the first operand;
    • complement of fields:
      • supporting an offset for the second operand;
    • intersection of fields:
      • supporting an offset for the second operand;
  • operations with fields as with matrices:
    • rotating of a field clockwise;
  • populating of a field according to Conway's Game of Life rules:
    • using of the naive algorithm with iterating and copying of a whole field.

Repository

Link: https://github.com/thewizardplusplus/lualife/tree/v1.5.2.

Content: code.

License: MIT.