Skip to content

Instantly share code, notes, and snippets.

@hafsasheik
Created September 29, 2020 11:57
Show Gist options
  • Save hafsasheik/2d760d26659abd9214e6b172e5824b00 to your computer and use it in GitHub Desktop.
Save hafsasheik/2d760d26659abd9214e6b172e5824b00 to your computer and use it in GitHub Desktop.
2d game
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace _2dgame
{
class Program
{
class Entitet
{
public char Kropp { get; set; }
//konstruktor
public Entitet(char kropp)
{
Kropp = kropp;
}
class Föremål : Entitet
{
//Konstructor
public Föremål(char kropp) : base(kropp)
{
}
}
class Varelse : Entitet
{
//prop
public int Strength { get; set; }
public int Life { get; set; }
public int Happiness { get; set; }
//kontruktor
public Varelse(char kropp, int strength, int life, int happiness) : base(kropp)
{
Strength = strength;
Life = life;
Happiness = happiness;
}
}
class Spelare : Varelse
{
//prop
public int Stamina { get; set; }
//konstruktor
public Spelare(char kropp, int life, int strength, int happiness, int stamina) : base(kropp, life, strength, happiness)
{
Stamina = stamina;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment