Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Tetris/Models/Game.cs

43 lines
825 B
C#
Raw Normal View History

2022-04-06 11:15:55 +02:00
using System.ComponentModel;
namespace Tetris.Models;
2022-04-06 11:15:55 +02:00
public class Party : INotifyPropertyChanged
{
private int _score;
private string _userName;
2022-04-06 11:15:55 +02:00
public Party(string userName)
{
_userName = userName;
}
2022-04-06 11:15:55 +02:00
public string UserName
{
get => _userName;
2022-04-06 11:15:55 +02:00
set
{
_userName = value;
OnPropertyChanged("UserName");
}
}
2022-04-06 11:15:55 +02:00
public int Score
{
get => _score;
2022-04-06 11:15:55 +02:00
set
{
_score = value;
OnPropertyChanged("Score");
}
}
2022-04-06 11:15:55 +02:00
public event PropertyChangedEventHandler PropertyChanged;
2022-04-06 11:15:55 +02:00
protected virtual void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
2022-04-06 11:15:55 +02:00
}