- Sorting anything lexicographically is implemented
- A new text-editor, currently supporting:
- bold, italic, underlined, and strikethrough text
- coloured text
- different fonts
- different font-sizes
- headers 1, 3, and 6
- bulleted and numbered lists
- A very basic menu-bar allowing you to save projects in different locations, and return to the project-picker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
namespace Assets.Scripts.Cards { | |
[RequireComponent(typeof(RectTransform), typeof(Image))] | |
public class Card : MonoBehaviour, | |
IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, | |
IBeginDragHandler, IDragHandler, IEndDragHandler { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool InventoryContains(Item i){ | |
return inventory.FindIndex(item => item.id == i.id) >= 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <algorithm> | |
#include <functional> | |
#include <set> | |
template<typename T> | |
using rw = std::reference_wrapper<T>; | |
template<typename T> | |
using crw = const std::reference_wrapper<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void clearPiece( const int sq, position* pos ) { | |
ASSERT(sqOnBoard(sq)); | |
int piece = pos->pieces[sq]; | |
ASSERT(pieceValid(piece)); | |
int colour = pieceColours[piece]; | |
HASH_PIECE(piece, sq); | |
int t_pieceNum = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generateAllMoves(const position* pos, moveList* list) { | |
ASSERT(pos->checkBoard()); | |
list->count = 0; | |
int side = pos->side; | |
bool isWhite = side == WHITE; | |
// loop for all pawns | |
if (side == WHITE) { | |
for (int i = 0; i < pos->pieceNum[P]; i++) { | |
int sq = pos->pList[P][i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generateAllMoves(const position* pos, moveList* list) | |
{ | |
// TODO reduce pawn move generation to not use the "if" and maybe reduce it to one addPawnMove function | |
ASSERT(pos->checkBoard()); | |
list->count = 0; | |
int side = pos->side; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void position::parseFEN(std::string FEN) | |
{ | |
ASSERT(FEN != ""); | |
ASSERT(this != nullptr); | |
int rank = RANK_8; | |
int file = FILE_A; | |
int piece = 0; | |
int count = 0; | |
int sq64 = 0; |
NewerOlder