You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
867 B
59 lines
867 B
2 years ago
|
using System;
|
||
|
|
||
|
namespace TEC.Model
|
||
|
{
|
||
|
public class Human : Player
|
||
|
{
|
||
|
public Human()
|
||
|
{
|
||
|
base.name = "Человек";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public class Alien : Player
|
||
|
{
|
||
|
public Alien()
|
||
|
{
|
||
|
base.name = "Пришелец";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public class Player : Ability
|
||
|
{
|
||
|
public string name;
|
||
|
int health;
|
||
|
int score;
|
||
|
|
||
|
int positionX;
|
||
|
int positionY;
|
||
|
|
||
|
public int GetPositionX() { return positionX; }
|
||
|
public int GetPositionY() { return positionY; }
|
||
|
|
||
|
public void SetPosition(int x, int y)
|
||
|
{
|
||
|
positionX = x;
|
||
|
positionY = y;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public class Ability
|
||
|
{
|
||
|
bool canMoveForward;
|
||
|
bool canMoveBackward;
|
||
|
bool canFly;
|
||
|
|
||
|
public Ability()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public Ability(bool canMoveForward, bool canMoveBackward, bool canFly)
|
||
|
{
|
||
|
this.canMoveForward = canMoveForward;
|
||
|
this.canMoveBackward = canMoveBackward;
|
||
|
this.canFly = canFly;
|
||
|
}
|
||
|
}
|
||
|
}
|