Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Cartes
- {
- public class Board
- {
- private List<Photo> photos;
- public Board()
- {
- photos = new List<Photo>();
- }
- public int Length
- {
- get
- {
- return photos.Count;
- }
- }
- public void Add(Photo photo)
- {
- photos.Add(photo);
- }
- public void Delete(Photo photo)
- {
- photos.Remove(photo);
- }
- public Photo FindPhoto(int x, int y)
- {
- return photos.LastOrDefault(
- photo => photo.Intersection(x, y));
- }
- public void MoveToFront(Photo photo)
- {
- photos.Remove(photo);
- photos.Add(photo);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement