Question
I need to keep track of all states previously visited in a game in C#. A state is a list of integers. Some examples of
I need to keep track of all states previously visited in a game in C#. A state is a list of integers. Some examples of states are:
List
List
List
My assignment is to use a hash table to determine whether a state has been visited. Can you please describe (using C#) how I can create, add states to and check whether a list has been added to a hash table? For example, assume state1 was added to the hash table. Then I need a function that tells me that state3 can not be added to the hash table because the same sort of list (1,2,3) has been added before.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started