CODE CHO LỚP CDIEM BẰNG NGÔN NGỮ C# { private int x, y; #region Nhom khoi tao public CDIEM() //CDIEM d = new | CODE CHO LỚP CDIEM BẰNG NGÔN NGỮ C private int x y region Nhom khoi tao public CDIEM CDIEM d new CDIEM x 0 y 0 public CDIEM int x int y CDIEM d new CDIEM 5 10 x y public CDIEM CDIEM d CDIEM d new CDIEM 5 10 CDIEM d2 new CDIEM d . . . public void KhoiTao x 0 y 0 public void KhoiTao int x int y 5 10 x y public void KhoiTao CDIEM d d public void Nhap do Nhap x x while KiemTrax x do Nhap y y while KiemTray y public void PhatSinh Random rd new Random x 0 - 1 y 0 - 1 endregion region Nhom Kiem Tra Rang Buoc public bool KiemTrax int xx if xx 0 xx return false return true public bool KiemTray int yy if yy 0 yy return false return true endregion region Nhom cung cap thong tin public void Xuat x y 0 1 x y public void Xoa x 0 y 0 public int X int x get 5 set get return x set x value public int Y int y get 15 set get return y set y value endregion region Nhom Cap Nhat public void DichPhai x if KiemTrax x x 0 public void DichPhai int k 5 x x k if KiemTrax x x