添加Lesson20

This commit is contained in:
2025-10-24 21:47:11 +08:00
parent 0fa8be7459
commit ed22d4bcbd
12 changed files with 612 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace
{
public struct Position
{
public int x;
public int y;
public Position(int x,int y)
{
this.x = x;
this.y = y;
}
}
public class Player
{
public string name;
public int hp;
public int atk;
public int def;
public Position position;
public Player()
{
name = "英雄";
hp = 100;
atk = 10;
def = 5;
position = new Position(0, 0);
}
}
}