Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 state1 = new List(){1,2,3}

List state2 = new List(){1,3,5}

List state3 = new List(){1,2,3}

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions