Question: I have to do cycle checking in a game I am making in C#. That means I have to check if I have ALREADY been

I have to do cycle checking in a game I am making in C#. That means I have to check if I have ALREADY been to some previous state.

A state in my code is just a list on ints. For example:

List state = new List(){1,2,3,4,5,6,7,8};

Basically I need to keep track of all states I have previously been to by adding them to some sort of hash table and then checking if it is already in the hash table.

Unfortunatly, I have no idea how to do this. Can you please tell me how I can create, add states to and check if a state has already been added to a hash table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!