39 lines
627 B
C
39 lines
627 B
C
|
//
|
||
|
// Created by hamac on 20.12.2024.
|
||
|
//
|
||
|
|
||
|
#ifndef MOVELIST_H
|
||
|
#define MOVELIST_H
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
struct Node {
|
||
|
std::pair<int, int> data;
|
||
|
Node *next;
|
||
|
};
|
||
|
|
||
|
|
||
|
class MoveList {
|
||
|
private:
|
||
|
Node *head;
|
||
|
|
||
|
public:
|
||
|
MoveList();
|
||
|
~MoveList();
|
||
|
|
||
|
MoveList &display();
|
||
|
|
||
|
MoveList &append(const std::pair<int, int> &data);
|
||
|
|
||
|
MoveList &insert(const std::pair<int, int> &data);
|
||
|
|
||
|
Node* search(const std::pair<int, int> &data) const;
|
||
|
|
||
|
MoveList &remove(const std::pair<int, int> &data);
|
||
|
|
||
|
void removeTail(const std::pair<int, int> &data);
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //MOVELIST_H
|