30 lines
665 B
C#
30 lines
665 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Keres{
|
|
abstract class Feladat<T> {
|
|
public T Kezdo { get; }
|
|
public T Cel{ get; protected set;}
|
|
|
|
public Feladat(T kezdo, T cel){
|
|
Kezdo = kezdo;
|
|
Cel = cel;
|
|
}
|
|
|
|
public virtual bool Celteszt(T allapot){
|
|
return EqualityComparer<T>.Default.Equals(allapot, Cel);
|
|
}
|
|
public abstract IEnumerable<(string, T)> Rakovetkezo(T allapot);
|
|
|
|
public virtual int Utkoltseg(int c, T allapot1, string lepes, T allapot2){
|
|
return c+1;
|
|
}
|
|
}
|
|
|
|
|
|
public class Csucs<T>{
|
|
|
|
}
|
|
|
|
} |