CS241: Implementing a game tree & Hashmap
- lab
- Education and accreditation (repris)
- Any implementation issues that I could help with? Here's my implementation plan...
- Start with input from file -- see April6_GameProto in examplesFromClass
- Add graphical output of Board
- Complete the Board class
- Finish & test
BoardList generateNextLegalBoards()
- Write gameOver()
- Write
void paint(Graphics, Rectangle)
- Add NaryTree -- see April3_Board
- Draw the NaryTree graphically
- Implement AIs (so to speak); add user controls for playing
- Hashtables and HashMaps
- What if look-up needs to be faster than O(n) or O(logN)? E.g. your web server is
getting thousands of hits/second...
- Need a way to access large database (of elements) in small constant time
- A trick: come up with a function to create a key from an element, and map from a key directly to that element in the database
- Silly example: dictionary of words, hashKey=first letter
- Oops! Collisions!
- googled java tutorial hashmap