Skip to content
11 changes: 11 additions & 0 deletions 29.10 2025/29.10 2025.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>_29._10_2025</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
29 changes: 29 additions & 0 deletions 29.10 2025/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

namespace _29._10_2025
{
public class Player
{
private string Name;
private const int maxHP = 100;
private const int minHP = 0;
private int curentHP = maxHP;
private int playerDamage = 20;
private List<string> invetory = new List<string>();


public bool DealDamage(Monster opponent)
{
opponent.TakeDamage(playerDamage);
return true;

}
internal void SetName(string? playerName)
{
Name = playerName;
}
internal void TakeDamage(int monsterDamage)
{
curentHP = monsterDamage;
}
}
}
32 changes: 32 additions & 0 deletions 29.10 2025/Monster.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using _29._10_2025;
using System.ComponentModel;

namespace _29._10_2025
{
public class Monster
{
private const int maxHP = 200;
private const int minHP = 0;
private int curentHP = maxHP;
private int monsterDamage = 1;



internal void TakeDamage(int damage)
{

curentHP -= damage;
}

public bool TakeDamage(Player opponent)
{
opponent.TakeDamage(monsterDamage);
return true;
}

internal static void DealDamage(Player player)
{
throw new NotImplementedException();
}
}
}
13 changes: 13 additions & 0 deletions 29.10 2025/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

using _29._10_2025;
Console.WriteLine("Zadaj meno hracovy");
string playerName = Console.ReadLine();
Player player = new Player();
player.SetName(playerName);
Monster monster = new Monster();

player.DealDamage(monster);
Monster.DealDamage(player);

Console.WriteLine();

262 changes: 204 additions & 58 deletions AppsLab.CSharp.Exercises.sln

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions ConsoleApp1/ConsoleApp1.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
64 changes: 64 additions & 0 deletions ConsoleApp1/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
////bool a = true;
////int b =5;
////int c =4;
////bool d = false;
////int e =5;
////bool vysledok = ((c <= b) || a!) && (a == (e == b));
////Console.WriteLine(vysledok);
////bool a = true;
////int b = 4
////int d



////bool vysledok2 = (!(a && d ) || (!(b < e) && !vysledok));


//Console.WriteLine("Zadaj cislo od 1 do 6");
//int cislo = int.Parse(Console.ReadLine());
//if (cislo == 6)
//{
// string input = Console.ReadLine();
// Console.WriteLine("ideš ešte raz");
//}
//else if (cislo <= 5)
//{
// Console.WriteLine($"Ides na policko cislo {cislo}");
//}

//using System.ComponentModel.Design;

//string? input = Console.ReadLine();
//int number = int.Parse(input);
//if (number >=1 && number <=6)
//{
// Console.WriteLine("Huraaa mam kocku");
//}

//else
//{
// Console.WriteLine("Fuj!Daj mi kocku");
//}





string text = "qwerty";
text = "iny text";
text += "pridany text";
int vek = 18;
int vek1 = 20;
vek += 5;
vek = 20;

if (vek > 18)
{
Console.WriteLine("si dospely");
}
else if (vek >= 20)
{

}


10 changes: 10 additions & 0 deletions ConsoleApp2/ConsoleApp2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
29 changes: 29 additions & 0 deletions ConsoleApp2/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Console.WriteLine("Zadaj Cislo: ");
int cislo1 = int.Parse(Console.ReadLine());
Console.WriteLine("Zadaj druhe cislo: ");
int cislo2 = int.Parse(Console.ReadLine());
Console.WriteLine("Zadaj operaciu(+,-,*,/)");
var Operacia = Console.ReadLine();
int vysledok = 0;
if (Operacia == "+")
{
vysledok = cislo1 + cislo2;
}
else if (Operacia == "-")
{
vysledok = cislo1 + cislo2;
}
else if (Operacia == "*")
{
vysledok = cislo1 * cislo2;
}
else if (Operacia == "/")
{
vysledok = cislo1 / cislo2;
}
Console.WriteLine($"vysledok je {vysledok}");





10 changes: 10 additions & 0 deletions ConsoleApp3/ConsoleApp3.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
10 changes: 10 additions & 0 deletions ConsoleApp3/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//internal class Program
//{
// private static void Main(string[] args)
// {
// string[] names = { "Ako", "sa", "mas?" };
// foreach (string name in names)
// {
// Console.WriteLine(${ "names"})
//}
// }
11 changes: 11 additions & 0 deletions NEviem vobec/NEviem vobec.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>NEviem_vobec</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
52 changes: 52 additions & 0 deletions NEviem vobec/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

using System;
namespace student
{
public class Student
{
public int Age = 22;
public string name = "Rudolf";
}
class program
{
static void Main(string[] args)
{
Student student = new Student();
if (student.Age > 18)
{
Console.WriteLine("rudolf moze pit alkohol");

}
else
{
Console.WriteLine("rudolf este alkohol legane pit nemoze");
}



}
}
}























2 changes: 2 additions & 0 deletions animal/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Console.WriteLine("chod mi do pice");
10 changes: 10 additions & 0 deletions animal/animal.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions bonusova uloha mato/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//int a = 1;
//int b = 2;
//int sum = a + b;
//int rozdiel = a - b;
//int násobenie = a * b;
//int delenie = a / b;
//int remainder = a % b;
//bool equality = a == b;
//bool inequality = a != b;
//bool greater = a > b;
//bool lesser = a < b;
//bool greaterEqual = a >= b;
//bool lesserEqual = a <= b;


bool a = true;
int b = 74;
int c = 42;


bool andBool1 = a && (b > c);
bool orBool2 = a && (b == c);
bool andBool3 = a && (b == c) || (b < c);
bool andBool4 = a && ((b == c) || (b < c));

11 changes: 11 additions & 0 deletions bonusova uloha mato/bonusova uloha mato.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>bonusova_uloha_mato</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Loading