Skip to content

Instantly share code, notes, and snippets.

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;
#pragma once
#include <string>
#include <iostream>
#include <bitset>
#include <SDL/SDL.h>
#include "Position.h"
#include "Debug.h"
#include "Button.h"
Button::Button() {
}
Button::~Button() {
}
#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>;
private bool InventoryContains(Item i){
return inventory.FindIndex(item => item.id == i.id) >= 0;
}
@Folling
Folling / card
Created February 11, 2018 21:29
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 {

New Features

  • 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