Antzy21.Games.Checkerboard 5.0.0

dotnet add package Antzy21.Games.Checkerboard --version 5.0.0                
NuGet\Install-Package Antzy21.Games.Checkerboard -Version 5.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Antzy21.Games.Checkerboard" Version="5.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Antzy21.Games.Checkerboard --version 5.0.0                
#r "nuget: Antzy21.Games.Checkerboard, 5.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Antzy21.Games.Checkerboard as a Cake Addin
#addin nuget:?package=Antzy21.Games.Checkerboard&version=5.0.0

// Install Antzy21.Games.Checkerboard as a Cake Tool
#tool nuget:?package=Antzy21.Games.Checkerboard&version=5.0.0                

Checkerboard 5.0

This library is for efficient storing of creating, modifying and accessing a checkerboard. A checkerboard is an 8x8 board of squares used in games such as Chess and Checkers. Checkerboard is implemented functionally using F#. The library mainly comprises two modules: Coordinates and BitMap, each with their associated functions.

Types and Modules

Coordinates

The coordinates type plays a vital role within the library, represented as a UInt64. It mainly deals with the creation, manipulation, and extraction of checkerboard square coordinates.

Module Functions:
  • construct: Constructs a coordinates instance from given row and column values, represented as integers.

  • getFile: Returns the file (column) of the coordinates instance as a numeric value, based at 0.

  • getFileLetter: Returns the file (column) of any given coordinates type as an alphanumeric character.

  • getRow: Returns the row of the coordinates instance as a numeric value, based at 0.

  • getRowNumber: Returns the row of the coordinates instance as a string value, based at 1.

  • getName: Returns the name of the coordinates instance as a string, which is the combination of its file and row.

  • parse: Takes a string representation of a coordinate (in "[file][row]" format, e.g., "a2") and transforms it into a coordinates instance.

BitMap

The bitMap type, essentially a UInt64, represents checkerboard states effectively. A checkerboard layer composed of multiple bitMaps can denote custom square states over an 8x8 board.

Module Functions:
  • getValueAtCoordinates (c: coordinates) (bitMap: bitMap): Get the bit value at a specific coordinate from the provided bitmap.

  • setValueAtCoordinates (value: bool) (c: coordinates) (bitMap: bitMap): Sets the designated value at a specific coordinate in the provided bitmap.

  • switchValueAtCoordinates (c: coordinates) (bitMap: bitMap): Switches the bit value at a specific coordinate.

  • isolateValues (bitMap: bitMap): Isolates the coordinates of positive values in bitmap format. Returns a list of bitMaps where each has a single bit in common with the given bitmap.

CoordinatesCollection Module

The CoordinatesCollection type manages collections of Coordinates instances. Each CoordinatesCollection is a UInt64 under the hood, which serves as a compact way to store multiple coordinates at once.

Module Functions
  • construct: Constructs an empty coordinatesCollection.

  • toList: Converts a coordinatesCollection into a List of coordinates.

  • append: Adds a coordinates instance to a coordinatesCollection.

  • appendResult: Tries to append a coordinates result value to a coordinatesCollection. If coordinates result is an error, this function ignores it and returns the coordinatesCollection as-is.

  • remove: Deletes a coordinates instance from a coordinatesCollection.

  • filter: Filters a coordinatesCollection, such that only coordinates that also exist in a provided mask CoordinatesCollection remain in the output.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.0 185 1/20/2024
4.0.1 209 11/19/2023
4.0.0 203 5/13/2023
3.0.0 345 1/21/2023 3.0.0 is deprecated because it has critical bugs.
2.0.1 223 3/31/2023
2.0.0 367 11/20/2022
1.2.1 430 10/10/2022
1.2.0 406 10/2/2022
1.1.1 417 9/4/2022
1.1.0 417 9/4/2022
1.0.1 423 9/4/2022
1.0.0 426 9/3/2022

Upgrade to .net 8. Major restructure of Coordinates type.