Sage v2.0.0 Release Notes

Release Date: 2016-07-17 // almost 8 years ago
  • โœจ Enhancements

    • ๐ŸŽ Performance greatly improved when performing operations with Board

    ๐Ÿ†• New Features

    • Most significant bit operations to Bitboard:

      • Properties: msb, msbIndex, msbSquare
      • Methods: popMSB(), popMSBIndex(), popMSBSquare()
    • Board initializer from arrays of piece characters

      Board(pieces: [["r", "n", "b", "q", "k", "b", "n", "r"],
                     ["p", "p", "p", "p", "p", "p", "p", "p"],
                     [" ", " ", " ", " ", " ", " ", " ", " "],
                     [" ", " ", " ", " ", " ", " ", " ", " "],
                     [" ", " ", " ", " ", " ", " ", " ", " "],
                     [" ", " ", " ", " ", " ", " ", " ", " "],
                     ["P", "P", "P", "P", "P", "P", "P", "P"],
                     ["R", "N", "B", "Q", "K", "B", "N", "R"]])
      
    • ๐Ÿ“œ Parsing PGN string data with PGN(parse:)

    • Exporting PGN string data with exported()

    • ๐Ÿ†• New Player struct

    ๐Ÿ’ฅ Breaking Changes

    • Piece has been changed to a struct type with nested a Kind type

      • Values such as isKing and relativeValue now belong to Kind
    • The argument-less bitboard() method for Board has been changed to occupiedSpaces

    • Replaced Game.Mode with two Player instances for a game

    ๐Ÿ›  Fixes

    • ๐Ÿšš Calling redoMove() would sometimes cause a crash if the Game instance had no available moves (e.g. was over).

    • The Board playground view for iOS and tvOS was flipped vertically

    • canPromote(_:) for Piece didn't take king into account

    • โช Castling rights weren't restored in undoMove()

    • ๐Ÿšš execute(move:) didn't check the promotion piece's kind