Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

731 B
Raw Blame
using System;
using Unity.Properties;
using UnityEngine.UIElements;

public sealed class CabinetVM : INotifyBindablePropertyChanged
{
    public event EventHandler<BindablePropertyChangedEventArgs> propertyChanged;
    string _name = "", _portfolio = "";
    int _competence;

    [CreateProperty] public string Name { get => _name; set { _name = value; Notify(nameof(Name)); } }
    [CreateProperty] public string Portfolio { get => _portfolio; set { _portfolio = value; Notify(nameof(Portfolio)); } }
    [CreateProperty] public int Competence { get => _competence; set { _competence = value; Notify(nameof(Competence)); } }

    void Notify(string p) => propertyChanged?.Invoke(this, new BindablePropertyChangedEventArgs(p));
}