FreakC-Foundation / cassidy

Cassidy, bringing static typing, strictness, safety and precision into your web project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


A programming language with precision

language

Examples

Hello, World!

class Main {
    static void Main() {
        console.log("Hello, World!")
    }
}

Class and OOP system

class Item {
    public string name;
    public Item(string name) {
        this.name = name;
    }
}
// You can inherit a class like this
class Weapon : Item {
    public float damage;
    public Weapon(float damage, string name) : base(name) {
        this.damage = damage;
    }
    void dealDamage() {
        console.log(`Your ${name} deals ${damage} damage`)
    }
}

class Consumable : Item {
    public int useTime;
    public Consumable(int useTime, string name):base(name) {
        this.useTime = useTime;
    }
    void consume() {
        console.log(`You consumed`)
    }
}
// You can also inherit multiple classes
class ThrowingWeapon : Consumable,Weapon {
    public float speed;
    public ThrowingWeapon(float speed, int useTime, string name, float damage):base(useTime, name, damage) {
        this.speed = speed;
    }
}

Copyrights and License

Copyrights © 2021 Cassidy

This project is licensed under the GNU GPLv3 License

About

Cassidy, bringing static typing, strictness, safety and precision into your web project

License:GNU General Public License v3.0


Languages

Language:TypeScript 92.5%Language:JavaScript 6.4%Language:Batchfile 1.1%